angular-simple-server

0.1.4 • Public • Published

angular-simple-server

Simple server that supports SEO and html5mode rewriting

Build Status

Prerequisite

You should have a running static server for AngularJS application codes! (ex. aws s3)

Features

Usage

Minimal Usage

$ git clone https://github.com/gifff/angular-simple-server
cd angular-simple-server
$ npm install
$ PRERENDER_SERVICE_URL=http://localhost:3000 node server

Advanced Usage

Show available tasks

$ grunt

Run server

$ node server
# OR 
$ grunt serve # run by nodemon 

Deploy

$ cp ecosystem.json.sample ecosystem.json
$ vim ecosystem.json
$ grunt deploy:production

Extension

Implement more features in extension.js file

Configurations

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.

NG_PRERENDER_SERVICE_URL

Default: ''

  • Prerender server URL for SEO support. If omitted, SEO support will be disabled
  • Prerender-hosted service url is http://service.prerender.io/

NG_PROXY_TARGET

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

NG_SERVER_PORT

Default: 8000

  • Port of angular-simple-server

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i angular-simple-server

Weekly Downloads

4

Version

0.1.4

License

MIT

Last publish

Collaborators

  • giff