diff options
-rw-r--r-- | back/src/server.ts | 6 | ||||
-rw-r--r-- | env | 5 | ||||
-rwxr-xr-x | run | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/back/src/server.ts b/back/src/server.ts index fca32d1..c73162a 100644 --- a/back/src/server.ts +++ b/back/src/server.ts @@ -3,9 +3,9 @@ import http from 'http'; import https from 'https'; import {Server} from 'socket.io'; -// export default new Server({cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}}); +export default new Server({cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}}); -const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({ +/*const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({ "key": fs.readFileSync(process.env.SSL_KEY), "cert": fs.readFileSync(process.env.SSL_CERT), "ca": fs.readFileSync(process.env.SSL_CA) @@ -14,4 +14,4 @@ base.listen(+process.env.PORT!, '0.0.0.0', () => { console.log(`Listening on port ${process.env.PORT}`); }); -export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}}); +export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});*/ @@ -1,6 +1,3 @@ export NEXT_PUBLIC_BACK_HOST='https://server.exozy.me' export ORIGIN="*" -export PORT=6001 -export SSL_KEY=/etc/letsencrypt/live/exozy.me/privkey.pem -export SSL_CERT=/etc/letsencrypt/live/exozy.me/cert.pem -export SSL_CA=/etc/letsencrypt/live/exozy.me/chain.pem +export PORT=6000 @@ -2,4 +2,4 @@ source ./env ./build cd front -npm run start -- -p 5000 | sudo -E node ../back/dist/index.js # sudo hack to read SSL files +npm run start -- -p 5000 | node ../back/dist/index.js |