Skip to content

The project consists in creating two end-points or APIs, an end-point must allow the insertion in the database of a polluted location with relative image; and the other allows you to view a list of locations with images.

Notifications You must be signed in to change notification settings

pierre1590/start2impact-Nodejs

Repository files navigation

Polluted cities

Table of Contents
  1. About the project
  2. APIs
  3. Installation
  4. Built With
  5. Framework
  6. Check APIs
  7. Contact

About the project

The project consists in creating two end-points or APIs, an end-point must allow the insertion in the database of a polluted location with relative image; and the other allows you to view a list of locations with images.

APIs

  • List of all polluted locations with images :
http://localhost:85/allPlaces
  • Create a place with its image :
http://localhost:85/addlPlace

Installation

  1. Clone the repo :
git clone https://github.com/pierre1590/start2impact-Nodejs.git
  1. Setup a MySQL Database;
  2. Import the migration file polluted_cities_places.sql
  3. Create a nodemon.json file and fill it with your DB data:
{
    "env" : {
        "NODE_PORT" : "",
        "NODE_DATABASE" : "",
        "NODE_DATABASE_USER" : "",
        "NODE_DATABASE_PW" : "",
        "NODE_DATABASE_URL" : "" 
    }
}
  1. Create a "public" folder and in the latter create another folder called "images" for uploading images.
  2. Install project dependencies :
     npm install 
  1. Start the server :
     npm start

Built with

  • Node.js
  • MySQL
  • Multer
  • Sequelize
  • uuid

Framework

  • Express.js

Check APIs

To verify that the end-points worked I used Talend API Tester - Free edition, but you can also use other apps like Postman.

  1. Create a project.
  2. Add a request.
  3. Select the method(GET,POST,...) and type the link in the address bar:
http://localhost:port/
  1. Click on the "save" button and then on the "send" button.

Contact

Piero Sabino - @SabinoPiero - P137ru590 - Piero Sabino - [email protected]

Project Link: https://github.com/pierre1590/start2impact-Nodejs

About

The project consists in creating two end-points or APIs, an end-point must allow the insertion in the database of a polluted location with relative image; and the other allows you to view a list of locations with images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published