-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev to
PROD
| web-3 wallet, fixture-standings, bugs, optimization, …
…auth (#1031) * `hot-fix` for #974 * 🔥hot fix/prod h2h issues (#982) * `update` README.md * `issue` #972 #976 * `issue` #972 * `deepsource` JS-0357 * `deepsource` JS-0128 * `deepsource` JS-0051 * `deepsource` JS-0116 * `deepsource` JS-0246 * `deepsource` JS-0241 * `deepsource` JS-0241 * `deepsource` JS-0123 * `deepsource` JS-0356 * Update/fixture odds status ns 2 (#985) * `hot-fix` for #974 (#975) * `🔥hot-fix` to PROD (#983) * `hot-fix` for #974 * 🔥hot fix/prod h2h issues (#982) * `update` README.md * `issue` #972 #976 * `issue` #972 * `deepsource` JS-0357 * `deepsource` JS-0128 * `deepsource` JS-0051 * `deepsource` JS-0116 * `deepsource` JS-0246 * `deepsource` JS-0241 * `deepsource` JS-0241 * `deepsource` JS-0123 * `deepsource` JS-0356 * issue #957 * Enhance/feature docker deploy (#1011) * `update` logs for `PROD` server * `update` for `Makefile` * `update` for `.dockerignore` * `setup` of `Docker` development env * `update` for `package.json` with `scripts:` * `.gitignore` update * `update` for `Docker` in `PROD` deployment * `update` Makefile * `update` for `README.md` * `update` express server for `https` * add `new` deploy script with `Github Actions` * `update` github actions test * `revert` for `http` only support * `update` for `Makefile` * `update` for `deploy.yml` * `revert` for `http` only support * `add` for `https` deploy * `update` - `Makefile` * `update` - `my-server.js` * issue `990` * issue `990` - `V1` * issue #949 * `update` packages * `update` for `github/actions` * issue #986 * `logs` update * `update` for `settings.json` * `update` issue #986 * `update` for `mobile` view `auth` * `revert` express for `heroku` * `revert` express for `heroku` * `revert` express for `heroku` * `revert` for `DEV` test `heroku` * `revert` for `DEV` test `heroku` * `revert` for `DEV` test `heroku` * `add` back `AuthWidget` * issue #1004 * issue #1004 * issue #1004 `checkout` * `update` example widget * issue #1004 * issue #1004 `dark-mode` hovers * issue #1004 `🐞 debug` * issue #1004 `🐞 debug` * issue #1004 * issue #1004 `🐞 debug update` * `revert` to `PROD` of `express-server` * `deepsource` JS-0239 * `deepsource` JS-0239 * `deepsource` JS-0242 * `deepsource` JS-T1001 * Enhance/translations and wallet issues and other (#1030) * issue #1006 #1021 * `update` .github/deploy script * issue #1019 * `renaming` * `aesthetic` `doc` * `update` for `docker:dev` + `package.json` scripts * `update` with `main` * `update` settings.json * issue #951 * issue #951 * issue #951 * issue #951 `redundant` code * issue #951 * issue #1028 * issue #951 `styles` update * `deepsource` JS-0128 * `update` documentations * issue #1018
- Loading branch information
Showing
52 changed files
with
2,901 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ COPY . . | |
|
||
EXPOSE 5055 | ||
# CMD ["node", "./build"] | ||
CMD ["npm", "start"] | ||
CMD ["npm", "run", "start:docker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: npm run start:heroku |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// DOC: https://github.com/sveltejs/kit/tree/master/packages/adapter-node#custom-server | ||
// DOC: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import | ||
|
||
import express from 'express'; | ||
import { handler } from './build/handler.js'; | ||
// import sslRedirect from 'heroku-ssl-redirect'; | ||
// DOC: https://expressjs.com/en/resources/middleware/compression.html | ||
import compression from 'compression'; | ||
import * as sslify from 'express-sslify'; | ||
// DOC: https://www.npmjs.com/package/request-ip | ||
|
||
const app = express(); | ||
|
||
/** | ||
* [ℹ] enable ssl redirect | ||
* DOC: https://www.npmjs.com/package/heroku-ssl-redirect | ||
* => does not seem to be working | ||
*/ | ||
// app.use(sslRedirect()); | ||
|
||
/** | ||
* [ℹ] separate from SvelteKit endpoint in attempts to | ||
* [ℹ] identify clients (IP - address) | ||
*/ | ||
/** | ||
app.get('/getClientIP', (req, res, next) => { | ||
const ip = req.headers['x-forwarded-for'] || | ||
req.socket.remoteAddress || | ||
null; | ||
console.log('ip', ip); | ||
const ip2 = req.ip | ||
console.log('ip2', ip2); | ||
const ip3 = requestIp.getClientIp(req); | ||
console.log('ip3', ip3); | ||
let ipAddr = req.headers["x-forwarded-for"]; | ||
if (ipAddr){ | ||
const list = ipAddr.split(","); | ||
ipAddr = list[list.length-1]; | ||
} else { | ||
ipAddr = req.connection.remoteAddress; | ||
} | ||
console.log('ipAddr', ipAddr); | ||
res.json( | ||
{ | ||
"ip": ip.toString().replace(/,/g, '') | ||
} | ||
); | ||
res.end() | ||
}) | ||
*/ | ||
|
||
/** | ||
* [ℹ] [FORCE] https-redirect | ||
* DOC: https://jaketrent.com/post/https-redirect-node-heroku | ||
* DOC: https://webdva.github.io/how-to-force-express-https-tutorial | ||
* [HEROKU] | ||
*/ | ||
app.use((req, res, next) => { | ||
if (req.header('x-forwarded-proto') !== 'https') | ||
res.redirect(`https://${req.header('host')}${req.url}`); | ||
else | ||
next(); | ||
}); | ||
|
||
/** | ||
* DOC: https://www.npmjs.com/package/express-sslify | ||
* DOC: https://stackoverflow.com/questions/51234023/heroku-nodejs-redirect-http-to-http | ||
*/ | ||
app.use(sslify.HTTPS({ trustProtoHeader: true })) | ||
|
||
// [ℹ] compress all responses | ||
app.use(compression()) | ||
|
||
/** | ||
* [ℹ] let SvelteKit handle everything else, | ||
* [ℹ] including serving prerendered pages and static assets | ||
*/ | ||
app.use(handler); | ||
|
||
/** | ||
* [ℹ] initialize app; | ||
* DOC: https://stackoverflow.com/questions/15693192/heroku-node-js-error-web-process-failed-to-bind-to-port-within-60-seconds-o | ||
*/ | ||
app.listen(process.env.PORT || 5000, () => { | ||
console.log('listening on port 5000'); | ||
}); |
Oops, something went wrong.