zgo/server.js

20 lines
551 B
JavaScript
Raw Normal View History

2022-04-11 14:48:34 +00:00
var fs = require('fs');
var http = require('http');
//var https = require('https');
//var certificate = fs.readFileSync('/etc/letsencrypt/live/zgo.cash/fullchain.pem');
//var privateKey = fs.readFileSync('/etc/letsencrypt/live/zgo.cash/privkey.pem');
//var credentials = {key: privateKey, cert: certificate};
const app = require('./backend/app');
const port = 3000;
app.set('port', port);
const httpServer = http.createServer(app);
//const httpsServer = https.createServer(credentials, app);
httpServer.listen(port);
//httpsServer.listen(port);