mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Initial nginx config generation, can use environment variabes PORT and SERVER_NAME. Dynamically figures out static regex based on build directory
This commit is contained in:
parent
df1c214a01
commit
1cf6cedaee
3 changed files with 10 additions and 1 deletions
4
Makefile
4
Makefile
|
@ -17,6 +17,10 @@ clean:
|
|||
static:
|
||||
cp -a ./static/. ./build/
|
||||
|
||||
nginx_conf:
|
||||
@make static
|
||||
node server/nginx.js
|
||||
|
||||
webpack:
|
||||
$(WEBPACK)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
"react-modal": "0.3.0",
|
||||
"react-onclickoutside": "0.3.1",
|
||||
"react-slick": "0.7.0",
|
||||
"routes-to-nginx-conf": "0.0.2",
|
||||
"routes-to-nginx-conf": "0.0.4",
|
||||
"sass-loader": "2.0.1",
|
||||
"slick-carousel": "1.5.8",
|
||||
"style-loader": "0.12.3",
|
||||
|
|
5
server/nginx.js
Normal file
5
server/nginx.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
var routes = require('./routes.json');
|
||||
var nginx_conf = require('routes-to-nginx-conf');
|
||||
|
||||
nginx_conf.generate_nginx_conf( routes, function(v) { console.log(v) } );
|
||||
|
Loading…
Reference in a new issue