Skip to content

Techprossng/Techpross-backend

Repository files navigation

Backend Repository

To set up your node enviroment

  • Install node.js

For windows

It's pretty straightforward. Please follow this link

For linux

Please follow this link

Setup and start server

  • To begin your server, start by installing all the dependencies:
npm install
  • To start the dev server: npm run start-dev-server will use nodemon. Read more about nodemon here

  • Create a .env.local file: This file will serve as your local .env file that will contain all the environment variables for the database and the jsonwebtoken verification secret for development.

  • You do not need to run the npm run db-init command. The knexfile.js has already been created. Only these commands will be of use to you:

    • npm run db-make-migration migration_name e.g npm run db-make-migration create_courses_table

    • npm run db-migrate-dev will update your local database with the latest migrations

    • npm run db-migrate-up: To run the specified migration that has not yet been run e.g npm run db-migrate-up 20231107222319_create_courses_table.js, assuming it was the last migration you made. Running the command without a specified migration file also runs the last migration that was made i.e npm run db-migrate-up

    • npm run db-migrate-down: To undo the last run migration. Like above, the migration file can also be specified.

      Please refer to this documentation about knex migrations.

📝 License

This project is MIT licensed.

About

This is the code base for the backend development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5