Simple server that supports SEO and html5mode rewriting
You should have a running static server for AngularJS application codes! (ex. aws s3)
- Html5mode rewriting
- SEO support
- Using Prerender
- Refer to Google documentation
- Deployment
- Using pm2 deployment system
- Automated as a grunt task
grunt deploy
$ git clone https://github.com/gifff/angular-simple-server
$ cd angular-simple-server
$ npm install
$ PRERENDER_SERVICE_URL=http://localhost:3000 node server
$ grunt
$ node server
$ # OR
$ grunt serve # run by nodemon
$ cp ecosystem.json.sample ecosystem.json
$ vim ecosystem.json
$ grunt deploy:production
Implement more features in extension.js
file
Configurations can be set with
- Local file
config.js
(NODE_ENV value will be used as env) - Environment variables.
Local file is used over env variables.
Default: ''
- Prerender server URL for SEO support. If omitted, SEO support will be disabled
- Prerender-hosted service url is
http://service.prerender.io/
Default: http://0.0.0.0:9000
- URL of a static server for AngularJS application codes
- Can use aws s3 bucket when static website hosting feature is enabled
Default: 8000
- Port of angular-simple-server