0

I created an express app using CodeStar and used Cloud9 as the IDE. Is there a simple way to quickly run the app from the Cloud9 integrated terminal, like nodemon on a desktop? I am getting annoyed having to commit, build, and deploy the application every time I want to test the code I just wrote.

kroe761
  • 3,296
  • 9
  • 52
  • 81

1 Answers1

1

Yes, just open a Terminal in Cloud 9 and start your app.

Then click on "Preview" button in Cloud 9 toolbar.

Detailed step by step instructions, incl. a few limitations, are detailed here https://docs.aws.amazon.com/cloud9/latest/user-guide/app-preview.html

Sébastien Stormacq
  • 14,301
  • 5
  • 41
  • 64
  • When I tried that, I get an OOPS message which says the app is not running. I tried to Run app.js, and I got a terminal message saying `Debugger listening on 127.0.0.1:15454`, and then i clicked Preview, but still nothing. – kroe761 Mar 07 '19 at 16:23
  • quoted from the doc I linked above : "Before you can preview your application from within the IDE, it must be running in the AWS Cloud9 development environment using HTTP over port 8080, 8081, or 8082 with the IP of 127.0.0.1, localhost, or 0.0.0.0. " Just configure your application to run on port 8080, 8081 or 8082 – Sébastien Stormacq Mar 07 '19 at 16:39
  • 1
    Got it! I had to add a server.js file to tell CLoud9 where to run the app. Thanks! – kroe761 Mar 07 '19 at 17:36
  • 1
    good to know it works. Once you have the preview available in Cloud9, you can also expand the tab to open it in your laptop browser. This gives you full access to web development tools from the browser to debug your app – Sébastien Stormacq Mar 07 '19 at 17:49
  • 1
    Now THAT is helpful. Thanks! – kroe761 Mar 07 '19 at 19:48