Giter Club home page Giter Club logo

crudnodejs's Introduction

Init

Para iniciar a aplicação entrar na pasta do projeto e executar o comando.

node app.js

E acessar a url

http://localhost:4300/

CrudNodeJS

Informações

Para alterar a extensão da view de .ejs para .html bastar alterar as linhas abaixo no arquivo de configuração (app.js)

app.set('view engine', 'html');
app.engine('html',require('ejs').renderFile);

SQL

CREATE TABLE IF NOT EXISTS `customer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `address` text NOT NULL,
  `email` varchar(200) NOT NULL,
  `phone` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

ALTER TABLE customer
ADD site VARCHAR(50);

CREATE TABLE IF NOT EXISTS `produtos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nome` varchar(200) NOT NULL,
  `descricao` text NOT NULL,
  `valorcompra` varchar(20) NOT NULL,
  `valorvenda` varchar(20) NOT NULL,
  `lucro` varchar(20) NOT NULL,
  `disponivel` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

ALTER TABLE produtos
ADD quantidade VARCHAR(50);

CREATE TABLE IF NOT EXISTS `demandas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `solucaoproduto` varchar(200) NOT NULL,
  `oquefazer` varchar(500) NOT NULL,
  `versaoproduto` varchar(200) NOT NULL,
  `baseservidor` varchar(20) NOT NULL,
  `prazo` varchar(20) NOT NULL,
  `impactodesenv` varchar(20) NOT NULL,
  `clienteespecifico` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
--
-- Dumping data for table`customer`
--

INSERT INTO `customer` (`id`, `name`, `address`, `email`, `phone`) VALUES
(2, 'Nadya Eka', 'Jl. Ciwidey no 20', '[email protected]', '086454743743'),
(3, 'Amali', 'Jl. kemandoran no 10 Jakarta', '[email protected]', '03937263623'),
(4, 'Angel ', 'Jl. Ciledug no 45A. tanggerang', '[email protected]', '082271626121'),
(5, 'Ujang', 'Jl. ribut no 90 A', '[email protected]', '07846352532'),
(6, 'Memet', 'Blok cepu no 14. Bandung', '[email protected]', '038372636232'),
(9, 'Agung', 'Jl st Petersburg no 34. Russia', '[email protected]', '038373273262'),
(10, 'Jhon Taylor', 'St paris A . Block 43. paris', '[email protected]', '039223232323');

crudnodejs's People

Contributors

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