15 lines
332 B
Bash
Executable File
15 lines
332 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -e
|
|
set -x
|
|
|
|
export NODE_ENV="${NODE_ENV:-development}"
|
|
|
|
if [ $NODE_ENV == "development" ]; then
|
|
# this runs webpack-dev-server with hot reloading
|
|
npm start
|
|
else
|
|
# build the app and serve it via nginx
|
|
npm run build
|
|
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
|
|
nginx -c /usr/src/app/nginx.conf
|
|
fi |