/express-patients-api

An express api to register patients.

Primary LanguageJavaScript

Express

A Rest API that deals with register of patients.

About the project   |    Goals   |    Installation   |    Routes

🚀 About the project

An API Rest made with Express to register patients and detect Corona symptoms. The file system API provided by Node was used to persist patients data, since the goal of this app was to focus on Express Fundamentals and not to set up a database.

☑️ Goals

Understand how to create a server with Express, setting the routes an separating the entity operations.

🏁 Installation

First of all, make sure that you have Node.js installed on your machine. Choose a package manager (NPM or Yarn)

Now, to install the dependencies

    yarn install

To start the application

    yarn dev

📨 Routes

Path HTTP Method Description
"/patients" GET Returns all patients as Json response
"/patients" POST Requires patient infos in body to create a new patient
"/patients/:id" PUT Updates a patient with given id, also needs info to change in body
"/patients/:id" DELETE Deletes the pacient with given id