Coder Social home page Coder Social logo

crud-vuejs's Introduction

crud-vuejs

Um crud com Vue.js e json-server

Setup

# global install
npm install -g json-server

git clone https://github.com/danielschmitz/crud-vuejs.git 
cd crud-vuejs

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

Aguarde alguns segundos para a compilação e o início do servidor, então acesse http://localhost:3000.

API

O arquivo cervejarias.json juntamente com o json-server fornece a API no servidor que irá responder com as informações necessárias. Exemplos:

Nomenclatura

Nomenclatura (ingles padrão):
Cervejaria: breweries (plural) brewery (singular)
Cerveja: beers (plural) beer )singular

Ações

cerejarias

GET    /breweries   #Obter todas as cervejarias 
GET    /breweries/1 #Obter cervejaria cujo o id é 1
POST   /breweries #Adiciona uma cervejaria na lista 
PUT    /breweries/1 #Edita a cervejaria cujo id é 1
DELETE /breweries/1 #Deleta a cervejaria cujo id é 1

cervejas

GET    /beer   #Obter todas as cervejas 
GET    /beer/1 #Obter cerveja cujo o id é 1
POST   /beer #Adiciona uma cerveja na lista 
PUT    /beer/1 #Edita a cerveja cujo id é 1
DELETE /beer/1 #Deleta a cerveja cujo id é 1

##Atenção

Essa é uma app de testes, nao use-a em produção

crud-vuejs's People

Contributors

danielschmitz 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.