Giter Club home page Giter Club logo

projeto-crud's Introduction

API Cadastro de funcionários.

Node.js, Express & MySQL: CRUD Simples

Um aplicativo CRUD simples e básico (Create, Get, GetAll, Update, Delete) usando Node.js, Express, MySQL

Passos para rodar o projeto

1º Passo

Criar o banco de dados:

CREATE DATABASE IF NOT EXISTS projeto_crud;

2º Passo

Execute os comandos abaixo no terminal:

npm install

3º Passo

Criação da tabela, executar comando abaixo:

node database.js up

4º Passo

Execute o comando abaixo para Inciar a API:

npm start

5º Passo

Após o servidor iniciado usar Postman ou outro de sua preferência:

**URL: localhost:3000/api/funcionarios/**

GET:
getAll - localhost:3000/api/funcionarios/
getById - localhost:3000/api/funcionarios/1

POST:
{
   "primeiro_nome":"Joana",
   "ultimo_nome":"D'Arc",
   "email":"[email protected]",
   "telefone":"3333333333",
   "organizacao":"Funcionaria",
   "designacao":"Front-End",
   "salario":2500.0
}

PUT:
{
   "primeiro_nome":"Jhon",
   "ultimo_nome":"Dias",
   "email":"[email protected]",
   "telefone":"9999999999",
   "organizacao":"Funcionaria",
   "designacao":"Back-End",
   "salario":2500.0
}

DELETE:
deleteById - localhost:3000/api/funcionarios/1
deleteAll - localhost:3000/api/funcionarios/

projeto-crud's People

Contributors

jhondiaz051298 avatar

Watchers

 avatar

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.