Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pawsong/angular-simple-server
Simple server that supports SEO and html5mode rewriting
https://github.com/pawsong/angular-simple-server
Last synced: about 5 hours ago
JSON representation
Simple server that supports SEO and html5mode rewriting
- Host: GitHub
- URL: https://github.com/pawsong/angular-simple-server
- Owner: pawsong
- Created: 2015-04-06T03:08:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-06T03:35:53.000Z (over 9 years ago)
- Last Synced: 2024-04-26T03:04:27.130Z (7 months ago)
- Language: JavaScript
- Size: 250 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-simple-server
Simple server that supports SEO and html5mode rewriting
[![Build Status][travis-image]][travis-url]
## Prerequisite
You should have a running static server for AngularJS application codes! (ex. aws s3)
## Features
* Html5mode rewriting
* SEO support
- Using [Prerender](https://prerender.io)
- Refer to [Google documentation](https://developers.google.com/webmasters/ajax-crawling/docs/specification)
* Deployment
- Using [pm2 deployment system](https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md#deployment)
- Automated as a grunt task `grunt deploy`## Usage
### Minimal Usage
```shell
$ 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
```shell
$ grunt
```#### Run server
```shell
$ node server
$ # OR
$ grunt serve # run by nodemon
```#### Deploy
```shell
$ 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](LICENSE)
[travis-image]: https://travis-ci.org/gifff/angular-simple-server.svg?branch=master
[travis-url]: https://travis-ci.org/gifff/angular-simple-server