Vender allows you to do the following
- Sign up as a Buyer or Seller.
- Ability to Deposit Coins for purchase.
- Ability to "Upload" and Restock products.
This application can be deployed locally by the following ways.
- Using
Docker
- Using the local environment.
If you are considering the first two options of deployment, you would need to have a local installation of MySQL.
To run the application with docker, you need a local installation of MySQL and the POSTGRES_DB
already created. After satisfying the requirement, run the following to build the image. Note: POSTGRES_DB
will not be created automatically and would need to be manually created.
docker build --pull --rm -f "Dockerfile" -t vender:latest "."
and this to run the image.
docker run --rm -it \
--network="host" \
-e NODE_ENV=prod \
-e POSTGRES_PASSWORD='newPassword' \
-e POSTGRES_USER='postgres' \
-e POSTGRES_DB='slot' \
-e PG_PORT=5432 \
-e PG_HOST='localhost' \
-e JWT_SECRET='jwtSecret'
-e JWT_EXPIRATION='50m'
-p 4000:4000/tcp \
vender:latest
You can also pull the image from DockerHub with:
docker run --rm -it \
--network="host" \
-e NODE_ENV='production' \
-e POSTGRES_PASSWORD='newPassword' \
-e POSTGRES_USER='postgres' \
-e POSTGRES_DB='slot' \
-e PG_PORT=5432 \
-e PG_HOST='localhost' \
-e JWT_SECRET='jwt'
-e JWT_EXPIRATION='50m'
-p 4000:4000/tcp \
teehazzan/vender:latest
Foremost, you have to clone this repository and install all the dependencies with the following commands.
git clone https://github.com/teezzan/vender.git
cd vender
npm install
Rename the .env.example
to .env
and customize it to your local machines specifications.
Note: POSTGRES_DB
will not be created automatically and would need to be manually created.
Run npm run dev
to start the local server.
npm run test
: Run testsnpm run build
: Builds the Typescript code and deploy locallynpm run prettier
: Run prettier Lint.
A documentation can be found at http://localhost:4000/