Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

iambk/x-book

Repository files navigation

xBook

A book exchange platform as part of mini project for application software development lab, Sem 5.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Prerequisite Version
Node.js 8.x
yarn (recommended) 1.x

As an alternative you can also use npm

Recommended workflow

  1. Fork this repository
  2. 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
  1. Change directory to the newly cloned x-book directory:
cd x-book
  1. 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
  1. Please create a branch and work on it to keep the workflow clean.

Setting up the project locally

  1. To install all the package dependencies, run the following command from the cloned x-book directory:

Via yarn (recommended)

yarn

Via npm

npm install
  1. 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 =

  1. 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