Commit ac6dbee5 authored by Aral Balkan's avatar Aral Balkan

Added simple development-time static web server.

parent 37a0d4a8
.DS_Store
data.git
site
node_modules
#!/bin/sh
nodemon index.coffee
\ No newline at end of file
################################################################################
#
# Simple static web server for Blockdown Builder development environment.
#
# This is Independent Technology. See https://ind.ie/manifesto
#
# Copyright © 2014-2015, Aral Balkan. © 2014-2015, Ind.ie.
# Released with ♥ by Ind.ie under GNU AGPLv3 or later.
# Free as in freedom. Please see the LICENSE file.
#
################################################################################
http = require 'http'
express = require 'express'
app = express()
app.use express.static('site')
#
# Create the server
#
server = http.createServer app
port = (process.env.PORT || 3000)
server.listen port, () ->
serverMessage = """
╔═══════════════════════════════════════════════════════════════════════════════╗
║ Blockdown Development-time static site running at http://localhost:3000 ║
╚═══════════════════════════════════════════════════════════════════════════════╝
"""
console.log serverMessage
echo "Error: please do not run directly. This is installed by the Blockdown Builder (https://source.ind.ie/blockdown/builder) ./install script."
exit 1
......@@ -11,5 +11,8 @@
"url": "git@source.ind.ie:blockdown/site-local.git"
},
"author": "Aral Balkan",
"license": "AGPL-3.0"
"license": "AGPL-3.0",
"dependencies": {
"express": "^4.13.3"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment