Skip to content

This project contains a Node.js API implementation using the HTTP module, Typescript, and Mongo DB

Notifications You must be signed in to change notification settings

JoshRami/Node-API-without-Express

Repository files navigation

Blog JSON API

This repo contains the solution for the week 3 assignment, the task is to build an API that manage blogs and comments that are scoped per blogs

drawing

Run in Postman Watch API Docs

Requiriments

Create a JSON API using the HTTP module that handles a server for a blog. The API should be able to handle:

  • Creating a blog post.
  • Updating a blog post
  • Deleting a blog post
  • Retrieving a single blog post based on an identifier.
  • Retrieve a list of blog posts ordered from most recent to older.
  • MongoDB must be used as storage solution.
  • All post must be stored to database.
  • No authentications or security restrictions are needed..

As an extra point add a way to add comments to each publication.

The API should be able to handle the same use cases for a comment as a blog post, the difference is that comments are scoped per blog post.

Project Setup

Mongodb is required, API and Db run on a local server, there is no need to make further steps than ports or connection URI

.env file is not supposed to contain secrets, it contains a port, and connection URI variables that may matter to you when running the API locally

Run the project

From project's root execute: ts-node src/index.ts

About

This project contains a Node.js API implementation using the HTTP module, Typescript, and Mongo DB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •