This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Config vars - Improve docker prod image (#12)
- Loading branch information
Showing
8 changed files
with
60 additions
and
44 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 was deleted.
Oops, something went wrong.
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,19 @@ | ||
const config = require('../config/project.config') | ||
const server = require('../server/main') | ||
const debug = require('debug')('app:bin:server') | ||
const corsProxy = require('cors-anywhere') | ||
|
||
if (config.env === 'development') { | ||
corsProxy.createServer({ | ||
// originWhitelist: [], // Allow all origins | ||
// requireHeader: [], | ||
// setHeaders: { }, | ||
// removeHeaders: [] | ||
}).listen(config.cors_proxy_port, config.server_host, () => { | ||
debug(`\n\n ⚠️ CORS proxy running on ${config.server_host}:${config.cors_proxy_port}`) | ||
}) | ||
} | ||
|
||
server.listen(config.server_port, () => { | ||
debug(`\n\n 💻 Server is now running at ${config.server_host}:${config.server_port}.`) | ||
}) |
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