Teasas Technical Test
This project demonstrates the teasas technical test requirement as received via email
Database
: PostgreSQLLanguage
: Javascript/ES6^Unit Test
: Mocha, Chai, SinonFramework / Environment
: Node.js && Expressversion control
: Git/Github
- Ensure you have all the below listed stacks on your machine
- From you terminal run
git clone https://github.com/torsami77/teasas_backend.git
- After cloning run
cd teasas_backend
to navigate to cloned directory - run
npm install
to install all the devDevpendencies. See "devDependencies" section in package.json file for list of all packages that will be installed - run
npm run migrate
to run database migrations - run
npm run seed
to seed the database with prepared "lessons" seeds - run
npm test
ornpm t
to run test
npm run start:dev
: To run development modenpm run build
: To run buildnpm start
: To run production modenpm test
: To run test- See the scripts section of package.json file for all available configured scripts.
Setup to use Postgres and Sequelise ORM.
npm run migrate
: to run models migration to databasenpm run undo-migrate
: to undo models migration to databasenpm run seed
: to run seednpm run undo-seed
: to undo seed
See sequelise documentation below for more guides on creating and managing models https://sequelize.org/master/manual/migrations.html**
/api/v1/auth/sign_in
: Sign in/api/v1/auth/sign_up
: Sign up/api/v1/lessons/get_all_lessons
: get all lessons
Please refer to teasas.postman_collection.json file in the root folder to see saved postman API request/response example, please do not hesitate to reach out to torsami77@gmail.com for questions/comments.