mirror of
https://github.com/sstent/node.git
synced 2026-01-26 15:12:37 +00:00
14 lines
349 B
CoffeeScript
14 lines
349 B
CoffeeScript
http = require 'http'
|
|
express = require 'express'
|
|
hello = require './hello'
|
|
|
|
expressApp = express()
|
|
.use(express.static __dirname + '/public')
|
|
# Apps create an Express middleware
|
|
.use(hello.router())
|
|
|
|
server = http.createServer(expressApp).listen 3000
|
|
|
|
# Apps also provide a server-side store for syncing data
|
|
hello.createStore listen: server
|