Skip to content

bugfixes && small improvements, opens browser by default #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
src/aot
src/aot
tmp
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.d.ts": {
"when": "$(basename).ts"
},
"**/*.js.map": true,
"**/*.metadata.json": true,
"compiled": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Serverside Rendering
# Angular Serverside Rendering

This sample shows how to use the new serverside rendering implementation that will be introduced with Angular 4.
Full article can be found here:
https://www.softwarearchitekt.at/post/2017/03/07/server-side-rendering-with-angular-4.aspx

## Build and Start

```
npm run build:all
cd dist
node main.server.bundle.js
git clone https://github.com/manfredsteyer/angular-ssr.git
cd angular-ssr
npm i
npm start
```

After this, open ``http://localhost:8000``.
Your default browser should open `http://localhost:8000`.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"scripts": {
"ng": "ng",
"tsc": "tsc",
"start": "webpack-dev-server",
"start": "npm run build:all && opn http://localhost:8000 && npm run server",
"dev-server": "webpack-dev-server",
"build:all": "npm run build:client && npm run build:server",
"build": "npm run build:client",
"build:client": "webpack",
"build:server": "ngc -p tsconfig.server.json && webpack --progress --config webpack.server.config.js",
"start:server": "npm run build:server && npm run server",
"server": "node dist/main.server.js",
"server": "cd dist && node main.server.bundle.js",
"test": "karma start ./karma.conf.js",
"lint": "ng lint",
"e2e": "protractor ./protractor.conf.js",
Expand Down Expand Up @@ -63,6 +64,7 @@
"karma-jasmine-html-reporter": "^0.2.2",
"karma-sourcemap-loader": "^0.3.7",
"less-loader": "^2.2.3",
"opn-cli": "^3.1.0",
"postcss-loader": "^0.13.0",
"postcss-url": "^5.1.2",
"protractor": "~5.1.0",
Expand Down