DevBook is a MERN stack application that helps developers all around the world collaborate.
For live demo, click here!
Following are prerequisites to be installed:
- Node
- NPM
- MongoDB
- Install server dependencies by running the following in the root directory
npm install
- Create a .env file in root and add the following content in it. <> are merely placeholders.
MONGO_URI=<mongoDBURI>
JWT_SECRET=<randomJWTKey>
EXPIRES_IN=<expirationTimeOfJWTToken>
GITHUB_TOKEN=<githubToken>
You can easily generate a GitHub token by following the instructions here!
Also, as per JWT documentation, following are valid "expiresIn" values:
expiresIn
: expressed in seconds or a string describing a time span zeit/ms.Eg:
60
,"2 days"
,"10h"
,"7d"
. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default ("120"
is equal to"120ms"
).
- Install client dependencies by:
cd client
npm install
- Go back to root directory and run the following:
cd ..
npm run dev
This will run both server and client from root. Enjoy!
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.