mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 04:07:14 +03:00
parent
43da382888
commit
e85eca1b66
@ -6,6 +6,10 @@ ENV LC_ALL=C.UTF-8
|
|||||||
# NODE_ENV used to run front server on production
|
# NODE_ENV used to run front server on production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
# Overrides for variables in front/config.js
|
||||||
|
ENV API_URL=https://staging.guide.aelve.com:4400
|
||||||
|
ENV PORT=5000
|
||||||
|
|
||||||
# Install NodeJS via nvm
|
# Install NodeJS via nvm
|
||||||
|
|
||||||
# replace shell with bash so we can source files
|
# replace shell with bash so we can source files
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
- `dev` - Start developing environment (starts both server and setup client middleware for server).
|
- `dev` - Start developing environment (starts both server and setup client middleware for server).
|
||||||
- `build` - Builds to /dist folder. Compiles (from ts to js) server right in dist folder, client files compiled in /dist/src.
|
- `build` - Builds to /dist folder. Compiles (from ts to js) server right in dist folder, client files compiled in /dist/src.
|
||||||
|
|
||||||
## Deploy process
|
## Deploy process
|
||||||
Node version >= 11, because used fs async methods which experimental now
|
Requirements: Node version should be >= 11, because of using fs async methods which experimental now.
|
||||||
|
|
||||||
- `git pull`
|
1. `git pull`
|
||||||
- `npm i`
|
2. `npm i`
|
||||||
- `npm run build`
|
|
||||||
- `set NODE_ENV=production`, also you can specify port by `set PORT=%port_number%` and `API_URL=%api_url%`
|
3. Now you have a choice how to set PORT and API_URL. Either set them in front/config.js, or use export (set) PORT=%port_number% API_URL=%api_url% (for example "http://localhost:4400" quotes matter) with dev commands.
|
||||||
- `cd dist`
|
|
||||||
- `npm i`
|
4. `npm run build`
|
||||||
- `node server`
|
5. `cd dist`
|
||||||
|
6. `npm i`
|
||||||
|
7. `export (set) NODE_ENV=production`
|
||||||
|
8. `node server`
|
||||||
|
Loading…
Reference in New Issue
Block a user