/Tickets-API

Tickets API

Primary LanguageTypeScript

Tickets API

The main object of this project is to provide a helpful way to track the tickets used for controlling the cost of production in a textile factory in their different areas.


Review this section for more information about this project and its scope.


How start the project on DEV

https://github.com/Ralexs0096/Tickets-API
  • Once it is cloned, we must provide the database and server port credentials creating a new file called .env. Please use the .env.example file as a reference.

If you are using docker, you can find an docker-compose file on the root of the project, this file will allow you to get a MSSQL instance quickly (remember adjust the SA password to match with .env variables)

  • Next, we create the database with the following command:
npm run create:database
  • Then, we need to create all the tables of the project, for that, we will use the Knex CLI executing this command
knex migrate:latest
  • Now, we have to generate all types with this command:
npm run generate:types
  • With all tables created and the correct DB config set, we can start the project executing
npm run dev