experimental html generation
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
spec
.gitignore
.npmignore
README.md
package.json

README.md

htdoc = require 'htdoc'
express = require 'express'

doc =
  html:
    """
    <html>
      <head>
        <title>Hello.</title>
      </head>
      <body>
        <h1>Hello.</h1>
      </body>
    </html>
    """
  css:
    """
    h1 {
      color: green;
      font-family: sans-serif;
    }
    """
  js:
    """
    console && console.log('Hi!')
    """

app = express.createServer()

app.get '/', (req, res) ->
  res.send htdoc.htdoc(doc)

app.listen 3000