Node.js backend application using Express, Sequelize and PostgreSQL.
Pull Postgres image from Docker Hub and start a container in port 5432.
docker pull postgres
docker run -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres
Add database url as an environment variable.
DATABASE_URL='postgres://postgres:mysecretpassword@localhost:5432/postgres'
Access database via console
docker exec -it NAME-OF-THE-CONTAINER psql -U postgres postgres
Install dependences and run the application
npm install
npm start
Run Jest tests for APIs
npm test
Run commandline version (prints existing blogs from the database)
npm run cli
- Exercise 13.1-13.3 - project setup and cli.js
- Exercise 13.4 - index.js supporting GET, POST, DELETE
- Exercise 13.5 - improved structure for the app
- Exercise 13.6 - adding PUT for likes
- Exercise 13.7 - adding error handler
- Exercise 13.8 - adding user management + tests
- Exercise 13.9 - adding validation for username
- Exercise 13.10 - adding login endpoint
- Exercise 13.11-13.12 - adding user info to blogs and deletion
- Exercise 13.13 - adding filtering by keyword
- Exercise 13.14 - expanded filtering
- Exercise 13.15 - sorting blogs based on likes in descending order
- Exercise 13.16 - adding authors endpoint
- Exercise 13.17 - adding migrations
- Exercise 13.18 - adding year column to blogs
- Exercise 13.19 - adding reading lists
- Exercise 13.20 - adding apis for reading lists
- Exercise 13.21 - adding info if the blog is read
- Exercise 13.21 - adding functionality to mark a blog in the reading list as read
- Exercise 13.22 - updating the read status in reading list
- Exercise 13.23 - adding support for read blogs in user endpoint
- Exercise 13.24 - adding session handling and refactoring