Code Monkey home page Code Monkey logo

restful-nodejs-restify's Introduction

RESTful com Node.js, Restify e MySQL

Este projeto foi desenvolvido durante a gravação da série de screencasts disponível em https://www.youtube.com/playlist?list=PLFJmwzuHdBRTBbkyH0gATtDhj6ikOIkMy e é pré-requisito para o curso Single Page Application com Vue.js http://www.treinatom.com.br/pt/edukee/detalhes-do-evento/190edc6b7593e3081a858f55652abd92a9d07353

Pré-requisitos

  • Node.js versão 8 ou superior;
  • Nodemon - npm i -g nodemon.

Instalação e Execução

  1. Faça o clone do repositório e no terminal navegue até a pasta;
  2. Instale as dependências do projeto com npm install;
  3. Faça uma cópia do .env.example com o nome .env e adicione as informações de conexão com seu banco de dados MySQL (produção e teste). Não se esqueça de criar as tabelas: create table categories (id INT(11) unsigned not null auto_increment, name VARCHAR(255), primary key(id));CREATE TABLE `users` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL DEFAULT '', `password` varchar(40) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  4. Rode o servidor de desenvolvimento com npm run dev;
  5. Rode os testes com npm test. Para observar os arquivos durante o desenvolvimento utilize npm test -- --watch;
  6. O endpoint do serviço estará disponível em http://localhost:3456 .

Sugestão

Utilize o Postman para testar suas chamadas. https://www.getpostman.com/.

restful-nodejs-restify's People

Contributors

vedovelli avatar

Stargazers

LUÍS CARLOS DE SOUZA  MENEZES 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.