Tech Junkie Blog - Real World Tutorials, Happy Coding!: AngularJS SPA: Installing ExpressJS Application Server

Thursday, March 30, 2017

AngularJS SPA: Installing ExpressJS Application Server

In our AngularJS SPA application we will be using the Express web server to serve up our web application.  In the previous blog post we installed the Express-generator globally.  Now we can install Express in the root folder of our SPA application.

Here are the steps to create an Express application:

1.  Open the command line prompt at the root folder of the SPA application








2.   Type "express" without the into the command line you will get a warning that jade will not the default view template type "y" to continue

3.  Once you type "y" a bunch of folders will be created for your application folder


4.  Now type npm install to install the latest node version and all the dependencies that express needs


























5.  To start the express server type npm start


6.  To verify that express is working open the browser and type http://localhost:3000
     you should see the following














7.  Now we want to nodemon so that we don't have to constantly stop and restart express to see our changes. To install nodemon first you have to install it globally by typing in npm install -g nodemon n


























8.  Now type nodemon to let nodemon monitor node for changes.  Make sure you are at the root of your application when you type nodemon




Posts In The AngularJS SPA Application Series:
  1. Setting Up Angular-Seed
  2. Preparing Angular-Seed For The Shopping List Application
  3. Refactor Code to Not Use Global Variables (Shopping List App)
  4. Installing MongoDB
  5. Create a MongoDB Configuration FIle
  6. Install mongoDB as a Windows Service
  7. Installing Express generator
  8. Installing ExpressJS Application Server
  9. Creating The SPA Project Folder Structure
  10. Setup Express To Serve Static Files
  11. Setup The Shopping Application For Heroku And Testing It Locally
  12. Deploy Shopping List Application To Heroku
  13. Install RoboMongo GUI for MongoDB

1 comment:

Search This Blog