Giter VIP home page Giter VIP logo

todo-app's People

Contributors

yogasaikrishna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

todo-app's Issues

Connection Null

I have try same example but i am change database connection parameter but i m received error

Connection { pool: null, init: [Function], acquire: [Function] }
Server listening on port 8000
Connection Done : undefined
Connection Error : { Error: getaddrinfo ENOTFOUND 192.151.152.180:3306 192.151.152.180:3306:3306
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
--------------------
at Protocol._enqueue (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\mysql\lib\protocol\Protocol.js:141:48)
at Protocol.handshake (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\mysql\lib\protocol\Protocol.js:52:41)
at PoolConnection.connect (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\mysql\lib\Connection.js:136:18)
at Pool.getConnection (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\mysql\lib\Pool.js:48:16)
at Connection.acquire (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\connection.js:17:15)
at Todo.get (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\models\todo.js:7:16)
at D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\routes.js:10:12
at Layer.handle [as handle_request] (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (D:\Gajendrasinh Zala\PictureThis\PictureThisAPI\node_modules\express\lib\router\route.js:112:3)
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '192.151.152.180:3306',
host: '192.151.152.180:3306',
port: 3306,
fatal: true }

can you please help me how to solve this i am new in node server

Connection acquired always success although input wrong value

I have api to update todo list through "PUT" Method as below:

var connection = require('../connection');
connection.acquire(function(err, con) {
con.query('update todo_list set ? where id = ?', [todo, todo.id], function(err, result) {
con.release();
if (err) {
res.send({status: 1, message: 'TODO update failed'});
} else {
res.send({status: 0, message: 'TODO updated successfully'});
}
});
});

But when i am trying to call this API through Postman and assign one value does not exist in the db(Ex: id= 100000). My result always return success without error.

Please help me resolve this issue. Thank you so much

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.