You could try this:
res.status(200).send((results[0].id).toString());
Guys are right – it doesn’t allow numbers.
Prooflink: http://expressjs.com/4x/api.html#res.send
Related Contents:
- Error: Can’t set headers after they are sent to the client
- How to access POST form fields in Express
- Client on Node.js: Uncaught ReferenceError: require is not defined
- How to generate unique ID with node.js
- How to access the request body when POSTing using Node.js and Express?
- Difference between res.send and res.json in Express.js
- How can I set response header on express.js assets
- How to programmatically send a 404 response with Express/Node?
- HTTP GET Request in Node.js Express
- Failed to load c++ bson extension
- Redis connection to 127.0.0.1:6379 failed – connect ECONNREFUSED
- What are express.json() and express.urlencoded()?
- SyntaxError: Unexpected token function – Async Await Nodejs
- Mocha API Testing: getting ‘TypeError: app.address is not a function’
- How do I get the domain originating the request in express.js?
- MongoDB select where in array of _id?
- how to properly close node-express server?
- How do sessions work in Express.js with Node.js?
- Check if token expired using this JWT library
- Using socket.io in Express 4 and express-generator’s /bin/www
- How to find the size of the file in Node.js?
- How to properly close Node.js Express server?
- Verify if my node.js instance is dev or production
- Jade conditional (if/else) to add class to div inline
- How to use query parameters in Nest.js?
- express app server . listen all interfaces instead of localhost only
- Why is PassportJS in Node not removing session on logout
- How to get rid of Connect 3.0 deprecation alert?
- How can I use webpack with express?
- MissingSchemaError: Schema hasn’t been registered for model “User”
- How to disable Express BodyParser for file uploads (Node.js)
- Catch express bodyParser error
- Reload Express.js routes changes without manually restarting server
- How do you detect the environment in an express.js app?
- Running multiple Node (Express) apps on same port
- Desktop applications only support the oauth_callback value ‘oob’/oauth/request_token
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- What do “module.exports” and “exports.methods” mean in NodeJS / Express?
- How can I easily get access to form data in Express js?
- How can I get the browser language in node.js (express.js)?
- Sequelize Where if not null
- require(‘babel/register’) doesn’t work
- Node.js: socket.io close client connection
- With Supertest, can I create an alternative request with some headers set by default?
- Why am I getting a “Cannot return null for non-nullable field” error when doing a mutation? [duplicate]
- What properties does Node.js express’s Error object expose?
- How to enable cors nodejs with express?
- Express.js View “globals”
- nodeJS exec does not work for “cd ” shell cmd
- Using Express Handlebars and Angular JS