By oldhamjosh
Hello there
I tried to setup a simple express server using the advice on here: https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image#further-information
I followed the steps, and now have my main app.js file in the folder /opt/healthPill. I installed the node modules from here successfully.
I have tried to access the server through http://45.55.154.16:3000 with no luck. I also tried http://45.55.154.16/healthPill:3000, and in both cases I get net::ERR_CONNECTION_REFUSED returned in my browser (Chrome) console log.
It is worth noting that I could not run the final command in the tutorial, as I did not have grunt installed, nor a gruntfile.js. As a result, I have tried with and without running the truncated command “NODE_ENV=production PORT=80”.
I am sorry if this is a really basic question, I am quite new to server config. All I am trying to do is create a small node server with one express POST endpoint. Running the project locally allows this.
Any help would be much appreciated.
Josh
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The instructions in the linked tutorial are for running an app based on the MEAN.js stack, but you are by no way limited to using that tool set. The MEAN One-Click image simply gives you Node.js and MongoDB pre-installed with a sample project in /opt/mean
Grunt itself is installed and available system-wide, but of course unless you have a gruntfile.js in your project it isn’t very useful. In that case, just start the app as you normally would with npm start or calling node app.js directly.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.