Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattms/jader
Start a simple server in any directory with Jade templates including CoffeeScript and Stylus.
https://github.com/mattms/jader
Last synced: 12 days ago
JSON representation
Start a simple server in any directory with Jade templates including CoffeeScript and Stylus.
- Host: GitHub
- URL: https://github.com/mattms/jader
- Owner: MattMS
- License: mit
- Created: 2012-04-07T15:19:45.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-06-17T13:51:50.000Z (over 9 years ago)
- Last Synced: 2024-12-17T02:43:02.276Z (22 days ago)
- Language: HTML
- Homepage: http://mattms.github.io/jader/
- Size: 135 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jade server
Jader lets you start a basic server in any folder.
It compiles
[Jade](http://jade-lang.com/)
templates, with embedded or linked
[CoffeeScript](http://coffeescript.org/),
[Markdown](https://daringfireball.net/projects/markdown/)
and
[Stylus](https://learnboost.github.io/stylus/)
files.Please note: This is only intended for aiding development.
If you want to use Jade templates in production, consider using
[Express](http://expressjs.com/).Alternatively, you can compile Jade files with `jade index.jade` or
[Gulp](http://gulpjs.com/),
but you may not have access to
[filters](http://jade-lang.com/reference/filters/)
this way.
Static files can then be served with [Nginx](http://nginx.org/).## Usage
You should install Jader globally so that it creates the executable
script for you.npm install -g jader
You can then start the server on [localhost](http://localhost/)
in any directory:jader
If you need to use a different port to 80, use:
jader -p 1337
Jader will also serve any other static files in the directory.
## Local variables
You can test the variables in templates by including a ".json" file
along with each ".jade" file.Any JSON file with the same base-name as the Jade template will be read
and passed into the template as local variables.### Example
index.jade
doctype html
html
head
title #{title}
body
p #{message}index.json
{
"title": "My Page",
"message": "It works!"
}