zgo/server.js

20 lines
551 B
JavaScript
Raw Normal View History

2021-11-08 19:09:16 +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};
2021-10-15 19:14:49 +00:00
const app = require('./backend/app');
const port = 3000;
app.set('port', port);
2021-11-08 19:09:16 +00:00
const httpServer = http.createServer(app);
//const httpsServer = https.createServer(credentials, app);
2021-10-15 19:14:49 +00:00
2021-11-08 19:09:16 +00:00
httpServer.listen(port);
//httpsServer.listen(port);