[nodejs] Re: Failed: Trying to use handlebars in NodeJs using Expressjs
Hello, It looks like a user issue, but there's not enough details to be certain. On Tuesday, July 14, 2020 at 3:14:15 AM UTC+2, Aman Kr Sharma wrote: > > > Error: ENOENT: no such file or directory, open > '/home/aman/Documents/Coding/nodejs/expressjs2/views/layouts/main.handlebars'``` > > This is what I am doing ```app.engine("hbs", expressHbs()); > > Does this file exist? Can you show the one including this "main.handlebars" as well? Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/7ceac5b3-9b65-4630-9393-5c987c8f8001o%40googlegroups.com.
[nodejs] Receiving json post in node
Hi, i'm new to node js and trying to write something to receive a json post and then manipulate it. I have created a server as such to listen over https to receive incoming requests, const https = require("https"), fs = require("fs"), helmet = require("helmet"); express = require("express"); const options = { key: fs.readFileSync("//Users/Documents/nodejs/pd_int/keys/server.key"), cert: fs.readFileSync("/Users/Documents/nodejs/pd_int/keys/server.crt") }; const app = express(); app.use(helmet()); // Add Helmet as a middleware to force https app.use((req, res) => { res.writeHead(200); res.end("hello world\n"); }); app.listen(8000); https.createServer(options, app).listen(8080); Not too sure however how to receive the post from the third party. Any thoughts on how to ammend the above to receive the json post thus allowing me to further manipulate it with another piece of code I have ..? Appreciate any advice/assistance -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/5698914f-a355-476b-a51b-106e264bfbe4o%40googlegroups.com.