Backend API for giant-stride-frontend
Client: Next js, TailwindCSS
Server: Node js, Express
Database: MongoDb
clone with git
git clone https://github.com/haniframadhani/giant-stride-backend.git
Install giant-stride-backend with npm
npm install
Install nodemon globally
npm install -g nodemon
Go to the project directory
cd giant-stride-backend
Start the development server
npm run dev
Start the non-development server
npm run start
To run this project, you will need to add the following environment variables to your .env file
PORT
optional, default value is 4000
ACCESS_TOKEN_SECRET
32 character long or more, only number and character (uppercase and lower case) E.g 8UzcKvJUi7aoxcMnF1we34uCJsG59vUC
REFRESH_TOKEN_SECRET
32 character long or more, only number and character (uppercase and lower case) E.g 8UzcKvJUi7aoxcMnF1we34uCJsG59vUC
ALLOW_ORIGIN
your frontend url E.g http://localhost:3000
DATABASE_URL
your mongodb database url E.g mongodb://127.0.0.1:27017/mydatabase
SECURE_COOKIE
not required in development. must set to false
for development don't leave empty, leave empty will set true
by default.
you can add the data example by importing blogs.json
& users.json
into your mongodb database.
development server run with nodemon, non-development server run without nodemon
Frontend repo