1.1.3 • Published 9 years ago

gfm-srv v1.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

GFM-srv npm.io

Github Flavored Markdown renderer server. Supports Heroku.

Install

$ npm install -g gfm-srv

Use

# Start server on port 8000
$ gfm-srv

# Start server on port 8001 with writing logs in file *./nodeserver.log*
$ gfm-srv --port 8001 --logs ./nodeserver.log

Use from scripts

//Require module
var server = require('gfm-srv');

// Start server
var nodeSrv = new server({
	port: 5000,
	root: '../www/',
	logs: true,
  static: './static/'
});

//Stop server
gfmSrv.stop();

Options

  • -r, --root path — Path, for server root-folder (default ./)
  • -p, --port number — Port on which the server is started (default 8000, or env PORT)
  • -h, --host host — Host or ip address on which the server will work (any host by default)
  • -i, --index file — Sets the index file for opening like default file in directories. For example: for uri /test/, server open test/index.html. Default index.html
  • -l, --logs path/boolean — Write logs flag. If you specify a path, it will write to this file (if path is folder, default filename node-srv.log)
  • --404 path — Path to 404 error page
  • --500 path — Path to 500 error page
  • -s, --static path — Sets path to folder with static files. Default ./static in this module
  • -t, --template path — Sets path to page template. Default ./templates/main.html in this module

Use for Heroku

  1. Install gfm-srv localy

    $ npm install gfm-srv --save
  2. Make Procfile

    You can use root, logs, 404 500 arguments

    web: node node_modules/gfm-srv/index --logs --404 404.html
  3. Deploy to heroku and enjoy!

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago