-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
49 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SERVER_PORT=3001 | ||
PUBLICWEB=./server/www | ||
COSMOSDB_ACCOUNT=your_cosmos_account | ||
COSMOSDB_DB=your_cosmos_db | ||
COSMOSDB_KEY=your_cosmos_key | ||
COSMOSDB_PORT=10255 |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# ignore server configuration | ||
*/env/development.js | ||
*.azcli | ||
|
||
# Logs | ||
|
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,14 @@ | ||
## vue-heroes Changelog | ||
|
||
<a name="1.1.0"></a> | ||
|
||
# 1.1.0 (2017-12-02) | ||
|
||
_Breaking Changes_ | ||
|
||
* Added `.env` file in the root | ||
* Added `dotenv` to read the `.env` file when running locally (without docker) | ||
* Removed `./src/server/environment` folder and its contents (replaced with `.env`) | ||
* docker-compose "debug" now uses the `.env` file | ||
* docker-compose for prod and cloud hosting will require ENV vars to be set in the cloud | ||
* `.env` is gitignored and not copied in the `Dockerfile` build process |
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
const express = require('express'); | ||
const bodyParser = require('body-parser'); | ||
|
||
const envFile = './server/env/' + process.env.NODE_ENV; | ||
const env = require(envFile); | ||
const routes = require('./server/routes'); | ||
|
||
const publicWeb = process.env.PUBLICWEB; | ||
const app = express(); | ||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: false })); | ||
|
||
app.use(express.static(env.publicWeb)); | ||
console.log(`serving ${env.publicWeb}`); | ||
app.use(express.static(publicWeb)); | ||
console.log(`serving ${publicWeb}`); | ||
app.use('/api', routes); | ||
app.get('*', (req, res) => { | ||
res.sendFile(`index.html`, { root: env.publicWeb }); | ||
res.sendFile(`index.html`, { root: publicWeb }); | ||
}); | ||
|
||
app.listen(env.serverPort, () => console.log(`API running on http://localhost:${env.serverPort}`)); | ||
const port = process.env.SERVER_PORT; | ||
app.listen(port, () => console.log(`API running on http://localhost:${port}`)); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
This file was deleted.
Oops, something went wrong.
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