Skip to content

coruja182/nodejsplayground

Repository files navigation

NodeJS Playground

This is a dummy API implemented in nodeJS that I am creating just to learn how to build something from scratch using this language and how to integrate the various libs that I might need to achieve what I call 'a beautiful project'. Code should be easy to understand and run.

Starting the project:

npm start

open your browser on http://localhost:3000/timezones

Development Notes

Requirements:

  • TypeScript should be used
  • Environment agnostic architecture
  • Code should be easily debugged on vscode

Next Steps:

  • create a new github project for nodeJS (without typescript?) for work-related investigations and keep this project clean
    • move the timezone-service related there
  • add request body parser in like in this tutorial https://www.qat.com/simple-rest-service-node-js-express/
  • create survey endpoints
  • model survey table schema
  • Database Integration
  • add postgresql using docker
    • make initial load of database
  • unit tests
  • integration tests
  • integrate automatic openapi swagger documentation
  • deployment, how does it work?
  • validate with some NodeJS expert friend ;)

Some Application Ideas

  • Recipe App
  • Quiz App
  • ToDo App (Level Intermediate)

https://blog.bitsrc.io/15-app-ideas-to-build-and-level-up-your-coding-skills-28612c72a3b1

JEST

Got a full config by running npx jest --init and created a backup of it, as I wanted to use ts-jest instead.

For the ts-jest, after adding the depencies described on https://www.npmjs.com/package/ts-jest

npx ts-jest config:init

Merged both configurations into one jest.config.js

References

Routes and Controllers

TypeScript Node.js Setup

PostgreSQL and docker-compose

Swagger

Unit Tests With Jest And TypeScript