Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics Deeper into Routing with Express POST Requests

What is the command to launch the web server when running this app?

I can't fins the section where Andrew teacher how to launch the web server that serves these page we are building in this section.

I figured it out. It's just: node app.js

If you already installed nodemon I think is nodemon app.js

1 Answer

A little late to the game here, but just to clarify for anyone else - in some of the earlier exercises, Andrew had us install nodemon via the terminal / console. nodemon always starts the file you've identified against "main" in the package.json file:

{
  "name": "treehouse-flashcards",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.15.2",
    "pug": "^3.0.2"
  }
}

So, as long as you're in the root directory, if you just enter nodemon into the terminal / console, it should launch app.js (as we've specified above in the package.json file). Weeeeeeeeeeeeee