Skip to content

LeapChain/Voting-Backend

Repository files navigation

Voting-Backend

Getting started

Docker

Copy the contents of .env.example file to .env and update the environment variables.

To build and run the development server

# have the container up and running
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build

# delete the container
docker-compose -f docker-compose.yml -f docker-compose.dev.yml down

To build and run the production server

# build the image on local machine
docker-compose -f docker-compose.yml -f docker-compose.prod.yml build

# push the image to dockerhub
docker-compose -f docker-compose.yml -f docker-compose.prod.yml push

# pull the image on the server
docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull

# run the updated image
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Now navigate to http://127.0.0.1:3000/ and the server should be running.

Run tests

Install the packages npm install

Run tests npm run test

Deploy to deta

Deploy

Deployed Servers

Staging Server: https://7hy843.deta.dev/

Production Server: https://7nfr0m.deta.dev/

Releases

No releases published

Packages

No packages published