Skip to content

Commit

Permalink
Merge pull request #64 from sketchglass/webpack-dotenv
Browse files Browse the repository at this point in the history
Load env for webpack from .env
  • Loading branch information
minamorl committed Jul 8, 2016
2 parents d3d3909 + 4c83b2c commit fad85e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# development env sample
PORT=8080
API_SERVER=127.0.0.1:8080
SESSION_SECRET=de0c0de3acdf8eaffc29900d2234b808cd55b201
TWITTER_CONSUMER_KEY=Y2xEYqt27j0t0GEJ17I9xUden
TWITTER_CONSUMER_SECRET=vSomtUuL4TNkSl7dwdMerKr7xO9AfIUpHYPMZTXR5axJvAVIis
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"open-browser": "node -e 'setTimeout(function(){require(`open`)(`http://127.0.0.1:23000`)}, 2000)'",
"start:frontend": "npm-run-all --parallel open-browser watch:frontend",
"start:server": "npm run compile:ts && node ./lib/server/index.js",
"start": "API_SERVER='127.0.0.1:8080' npm-run-all prepare:reset --parallel start:*",
"start": "npm-run-all prepare:reset --parallel start:*",
"deploy": "NODE_ENV=production npm-run-all prepare db:migrate build",
"pretest": "npm-run-all prepare:reset compile:ts db:test:prepare",
"test": "NODE_ENV=test mocha lib/test",
Expand Down
1 change: 1 addition & 0 deletions ui/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

const webpack = require("webpack");
require('dotenv').config({path: "../.env"})

module.exports = {
entry: "./src/index.tsx",
Expand Down

0 comments on commit fad85e0

Please sign in to comment.