isaquielfernandes / node-rest-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node [Weather] REST API

Running Your API Locally:

  1. Install Node.js and npm

  2. Install PostgreSQL Database

  3. Install Postman Client REST

Start a local development server:

  1. Clone this repository
git clone https://github.com/isaquielfernandes/node-rest-api.git
  1. npm install in the project root folder on local
  2. TypeORM(ormconfig.json)
// database config
{
    "type": "postgres",
    "host": "localhost",
    "port": 5432,
    "username": "your db username",
    "password": "your db passaword",
    "database": "weatherdb",
    "synchronize": true,
    "logging": false,
    "entities": [
       "src/entity/**/*.ts"
    ],
    "migrations": [
       "src/migration/**/*.ts"
    ],
    "subscribers": [
       "src/subscriber/**/*.ts"
    ]
}
  1. npm run dev to start
  2. Browse to http://localhost:3000
  3. npm run build to build to production locally

URL:

  • GET /forecast/
  • GET /forecast/:city - Para pesquisar previsao de tempo por name de cidade

About


Languages

Language:TypeScript 100.0%