Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 33 lines (27 sloc) 0.739 kB
bcfc5b9 @contra fix deps issue
contra authored
1 express = require "express"
2 http = require "http"
6ee05ec @contra fix box widths in small modals
contra authored
3 {join} = require "path"
e72a106 @contra update all the jazz
contra authored
4 Vein = require 'vein'
5f66768 @contra initial
contra authored
5
be8f2fc @contra pane
contra authored
6 port = process.env.PORT or 8080
7
5f66768 @contra initial
contra authored
8 # Web server
bcfc5b9 @contra fix deps issue
contra authored
9 app = express()
10 app.use express.staticCache()
11 app.use express.static join __dirname, './public/'
12 server = http.createServer(app).listen port
5f66768 @contra initial
contra authored
13
14 # Vein
bcfc5b9 @contra fix deps issue
contra authored
15 vein = Vein.createServer server
e72a106 @contra update all the jazz
contra authored
16 vein.addFolder join __dirname, './lib/services/'
17
be8f2fc @contra pane
contra authored
18 console.log "Server started on #{port}"
19
20 if process.argv[2] is '-u'
21 try
22 Pane = require 'pane'
23 opt =
24 title: "Smog"
25 height: 700
26 width: 1200
27 url: "http://localhost:#{port}"
28
29 process.nextTick ->
30 window = new Pane opt
31 window.open()
32 catch err
33 console.log 'You need to install libqtwebkit-dev to use the desktop UI.'
Something went wrong with that request. Please try again.