Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.15 KB

File metadata and controls

28 lines (23 loc) · 1.15 KB

MicroblogAppAPI

This is a practise project for making an backend API for a twitter-like microblogApp frontend. This api includes CRUD functions and db table creation for postgres. This project is made to practise skills in Express.js API creation and SQL database handling. This project is not complete but it includes all the core functions and is in a good state.

Installation

Clone the repository and run pnpm/npm install for needed dependencies. Also configure .env file that should include the following fields: (explanation) You also need to create your own postgreSQL database beforehand.

PORT: # Port for the api server to run in
NODE_ENV: # development/production
JWT_SECRET: # Secret for token signing

DB_USER: # Username for db
DB_PASSWORD: # Password set for the db
DB_HOST: # Host address for the db
DB_PORT: # Port of the db
DB_DATABASE: # Name of the db

Stack

  • Typescript
  • PostgreSQL
  • Express.js
  • Node.js
  • JWT

Learnings and challenges

One of the challenges was learning how to handle credential and users. I decided to go with JWT tokens but I think there is room improve in terms of token expiry and user session handling.