Getting started with Angular 2 with node.js/expressjs backend (http example included)
We will create a simple "Hello World!" app with Angular2 2.4.1 (@NgModule change) with a node.js (expressjs) backend.
Prerequisites
- Node.js v4.x.x or higher
- npm v3.x.x or higher or yarn
Roadmap
Step 1
Create a new folder (and the root dir of our back-end) for our app. Let's call it Angular2-express.
command line:
mkdir Angular2-express
cd Angular2-express
Step2
Create the package.json (for dependencies) and app.js (for bootstrapping) for our node.js app.
package.json:
{
"name": "Angular2-express",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "node app.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.13.3",
"express": "^4.13.3"
}
}
0 σχόλια :
Post a Comment