A book exchange platform as part of mini project for application software development lab, Sem 5.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisite | Version |
---|---|
Node.js | 8.x |
yarn (recommended) | 1.x |
As an alternative you can also use npm
- Fork this repository
- Clone the forked repository in your local machine
Via ssh
git clone git@github.com:<your_user_name>/x-book.git
Via https
git clone https://github.com/<your_user_name>/boox-xchange.git
- Change directory to the newly cloned x-book directory:
cd x-book
- To maintain your fork with the upstream, add a remote to the main x-book repository:
Via ssh
git remote add upstream git@github.com:iambk/x-book.git
Via https
git remote add upstream https://github.com/iambk/boox-xchange.git
- Please create a branch and work on it to keep the workflow clean.
- To install all the package dependencies, run the following command from the cloned x-book directory:
Via yarn (recommended)
yarn
Via npm
npm install
- Create an .env file with your local mysql database details in the following format:
PORT=3000
DB_HOST=localhost
DB_USER=
DB_PASS=
DB_NAME=
SESSION_COOKIE_NAME= #any string
SESSION_SECRET= #any string
.env is a shell file so there can't be spaces around =
- Start the server and navigate to localhost:3000 or localhost:port-number-you-gave in your browser
Starting the server
Using yarn
yarn start
Using npm
npm start