This project provides a look at getting started using Angular 2 Http functionality and how it can be used to call a Node.js RESTful service.
- Node.js 6.5.0 or higher
- MongoDB 3.2 or higher
-
Install Node.js (6.5 or higher) and MongoDB (3.2 or higher) on your dev box
- Node.js: https://nodejs.org
- MongoDB: https://docs.mongodb.com/manual/installation
-
Execute
mongod
to start the MongoDB daemon if it's not already running -
Install Nodemon and Gulp:
npm install nodemon gulp -g
-
Run
npm install
to install app dependencies -
Run the following Gulp task to copy required Angular modules into the
public
folder:gulp copy:libs
-
Run
npm start
to compile the TypeScript and start the server -
Browse to http://localhost:3000
-
Install Node.js (6.5 or higher) and Docker for Mac/Windows or Docker Toolbox - https://www.docker.com/products/overview
-
Open
config/config.development.json
and change the host fromlocalhost
tomongodb
-
Install Gulp:
npm install gulp -g
-
Run
npm install
-
Run
gulp copy:libs
-
Run
npm run tsc:w
to compile TypeScript to JavaScript locally (leave the window running). This is only needed when in "dev" mode. -
Open another command window and navigate to this application's root folder in the command window
-
Run
docker-compose build
to build the images -
Run
docker-compose up
to run the containers -
Navigate to http://localhost:3000 if using Docker for Mac/Windows or http://192.168.99.100:3000 if using Docker Toolbox in a browser