Search the Community
Showing results for tags 'express'.
-
I have successfully completed the node.js tutorial. I am trying to deploy an express app, and after reading another expressJS ticket I also tried putting the app in a subdomain titled express.jax.heliohost.us. The app folder is at the path - home/jax/node/riddleAdventure. The app url is - express.jax.heliohost.us/riddleadventure. The app has been registered using application manager. Dependencies have been ensured. Yet, the same express-related 'Cannot GET' error is displayed when I visit the url. Please advise, thanks very much! - Jax
-
I am trying to run a simple node app using express; however, I keep getting "Cannot GET /test" when I try to access the app (goochy13.heliohost.org/test). I have followed the Node tutorial on the Wiki and managed to get it working using "http" - but as I cannot get the same app to work using express instead of http I can only assume express is the problem. My simple test app is below. var express = require("express"); app = express(); const hostname = '127.0.0.1'; const port = 3000; app.get("/", (req, res) =>{ res.statusCode = 200; res.setHeader('Content-Type', 'text/html'); res.end('Node.js is on and working.'); }); app.listen(port, hostname, () => { console.log("Test app is running."); }); I have copied across the "node_modules" folder as a .zip - and extracted it from the server side. I have also included package.json and I hit "ensure dependencies" in the application manager. Certainly possible that I've missed a step or misunderstand what is required to get this up and running. Anyone got any ideas? Cheers