Skip to content

focusjk/backend-showhuai

Repository files navigation

README

Description

Save the RESTFULL data in the table without implementing anything to do a CRUD with the REST Verbs Post, Put, Update and Delete

Install

$ npm install

For use exemplo:

  1. Create a table in data base for exemplo

Creating database and table

USE namedatabase
CREATE TABLE persons (
    PersonID int,
    LastName varchar(255),
    FirstName varchar(255),
    Address varchar(255),
    City varchar(255)
);
  1. Config a data base connect in dbconnection.js
var mysql = require('mysql');
var connection = mysql.createPool({
    host: 'localhost',
    user: 'root',
    password: 'password',
  database: 'namedatabase'
});
module.exports = connection;
  1. Start aplication Into folter project make npm run dev Test http://localhost:3000/up Will show info time the server

  2. Test with your table http://localhost:3000/api/v1/crud?t=persons

Where t = table of the your data base

Thanks!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published