-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up ConGaLi
HOME > TECHNICAL DOCUMENTATION > SETTING UP CONGALI
This are the instructions needed to run ConGaLi on your local environment.
This configuration uses a local installation of istambul for coverage, so you won't need to run any particular script before the build process. There are possible failures running Istanbul on Windows so, if any issue arises, yo will have to investigate on that direction.
This server is configured and is suggested to be tested along with the Web fronted developed along, although you can use whenever client you like, as long you provide the proper data to this endpoint.
# install dependencies
npm install
# serve backend at localhost:3000, opens another port for debugging process.
npm run dev
# serve backend at localhost:3000
npm run app
# run unit tests
npm run unit
# run coverage
npm coverage
# run all tests
npm test
As a first approach to the build process we use Docker to develop in the local environment, so I had to modify the configuration to really be available on Heroku. And we will have to develop inside a container within Docker with the proper net configuration:
In Linux I've had to install node's port of foreman to avoid permissions issues by running "heroku local":
npm install -g foreman
and after that I was able to simulate the build running
rm -rf node_modules && npm install --quiet --production && nf start
"npm run build" "nf start" if you have foreman or "npm start" if you don't.
docker run -i -t --name localContainerName -p 3000:1996 image_name
(ctrl-c) to stop command
docker start localContainerName
docker network connect localNetworkName localContainerName
cd {project-root}
docker build -t remoteurl/image_name:version .
// write a script to update the local version of the app
The steps to play the game are as follow:
- Build & run the Backend "npm run dev"
- Build & run the web Frontend interface using "npm run dev"
- Open your Web Browser at http://localhost:8080 Enjoy :)