Code Monkey home page Code Monkey logo

crud-states's Introduction

Crud States


badgen badgen Node  Made By

This project is a NodeJS REST API developed for a CRUD of states

Getting Startted

Follow this instructions to get a copy of this project in your local env to develop and test.

Tools

To run the project you will need:

Installing Dependencies

Clone this repo:

git clone [email protected]:pcrodrigues0/crud-states.git
cd crud-states

Is recommended to user Yarn. To install it:

npm install -g yarn

Then, install projects dependencies:

yarn

Running

After config, to run application:

docker-compose up
yarn start

Routes

You can access the API of States by the following routes:

Method Route Description Body
POST /api/states Add a new state on DB name, uf
GET /api/states Get all states on DB none
GET /api/states/:uf Get states of this UF none
PUT /api/states/:id Update the state name, uf
DEL /api/states/:id Delete the state

You can access the API of Cities by the following routes:

Method Route Description Body
POST /api/cities Add a new city on DB name, stateId
GET /api/cities Get all cities on DB none
GET /api/cities/:name Get city by name none
GET /api/cities/stateid/:id Get city by stateId none
PUT /api/cities/:id Update the passed city name, stateId
DEL /api/cities/:id Delete the city

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.