app.js 726 Bytes
const http = require('http');
const express = require('express');
const fs = require('fs');
const schedule = require('node-schedule');
const spawn = require('child_process').spawn;
const { rawListeners } = require('process');
var port = 23023;

var app = express();
var router = require('./index')(app);

app.set('port', port);
app.set('views', __dirname + '/static');
app.set('view engine', 'ejs');
app.engine('html', require('ejs').renderFile);

app.use(express.static(__dirname + '/static'));

function update() {
  console.log('Updating . . .');
  spawn('python3', ["run.py"])
}
setInterval(update, 1000 * 60 * 60 * 3)

var server = http.createServer(app).listen(port, function(){
  console.log("Server Running . . .");
})