Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://localhost:8080/dashboard
- http://localhost:8080/heroes
- http://localhost:8080/detail/13
- <!doctype html>
- <html>
- <head>
- <base href="/">
- <meta charset="utf-8">
- <title>Tour of Heroes</title>
- import { NgModule } from '@angular/core';
- import { HttpModule } from '@angular/http';
- import { LocationStrategy, HashLocationStrategy } from '@angular/common';
- import { RouterModule } from '@angular/router';
- import { AppComponent } from './app.component';
- @NgModule({
- declarations: [
- AppComponent,
- ...
- ],
- imports: [
- HttpModule,
- RouterModule,
- ...
- ],
- providers: [
- ...,
- {provide: LocationStrategy, useClass: HashLocationStrategy}
- ],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
- location / {
- root /home/jan/tour-of-heroes/;
- index index.html index.htm;
- }
- error_page 404 =200 /index.html;
- pushstate-server /home/jan/tour-of-heroes
- node express.js
- var express = require('express'),
- path = require('path'),
- port = process.env.PORT || 8083,
- app = express();
- app.use(express.static(__dirname ));
- app.get('*', function(request, response){
- response.sendFile(path.join(__dirname + '/index.html'));
- });
- app.listen(port);
- console.log("server started on port " + port + ' at ' + __dirname + '/index.html');
- node http-server/bin/http-server /home/jan/tour-of-heroes
- live-server --entry-file=index.html /home/jan/tour-of-heroes
- ng serve -prod
- ng serve -prod -aot
Add Comment
Please, Sign In to add comment