Какие должны быть мои действия?
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.join(__dirname, './public'))); // если сайт лежит в папке public в корне проекта
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
<?php
// script for cron
shell_exec('php script1.php > /dev/null 2>/dev/null &'); // run script1.php as background process
shell_exec('php script2.php > /dev/null 2>/dev/null &'); // run script2.php as background process
shell_exec('php script3.php > /dev/null 2>/dev/null &'); // run script3.php as background process
?>
...
struct argkeys {
const char *name;
int shortname;
char *helpstr;
char *manstr;
char *description;
};
extern const struct argkeys ArgKeys[];
const struct argkeys ArgKeys[] = {
{"help", 'h', "-h, --help", "-h[--help]", "description"},
{"version", 'v', "-v, --version", "-v[--version]", "description"}
};
...
char* generate_password(char *symbols, int length)
{
srandom(time(NULL));
int counter = 0;
char randChar;
char *result = malloc(length + 1); // FIX
if(length < 1) {
printf("Type in a password Length \n");
scanf("%d", &length);
}
while(counter < length)
{
randChar = symbols[random () % strlen(symbols)];
result[counter] = randChar;
counter++;
}
return result;
}