- Start container then shell into it
make start
- Install dependencies
npm install
- Start docker container of node:10.3-alpine then run shell by calling sh
docker run --rm -it -v "$PWD":/usr/app node:10.3-alpine- sh
- Now we should be placed in sh mode of the container, we can start initializing project using npm
npm init -y && npm install --save graphql express express-graphql
To start development FASTER!
# Step 1: Build image
make image
# Step 2: Start container
make start
# Then do whatever in container
-
Using GitBash but no make's utility installed on Windows then How to add more to Git Bash on Windows
-
Add a slash to fix Error response from daemon: Mount denied.
-
Restart docker to fix Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3000:tcp:172.17.0.2:3000: input/output error
-
Use the
npx nodemon -L index.js
to fix Application isn't restarting due to some problem in networked environments (container running nodemon reading across a mounted drive) -
Add
testEnvironment: 'node'
to Jest's configuration to fix Cross origin null forbidden: Axios tries to make an xhr request in a Node environment, instead of an http request. It's issue due to Jest default environment is a browser-like but this app is builded in Node environment -
Install git to make
jest --watch
work property