index.coffee 1.36 KB
Newer Older
1 2
################################################################################
#
3
#	Better
4
#
5
#	A simple static web server installed and used by Better Builder.
6
#
7 8 9 10 11 12
#	This is Independent Technology.
#
#	▲❤ We practice Ethical Design (https://ind.ie/ethical-design)
#
#	© Aral Balkan. © Ind.ie. All Rights Reserved.
#	Released with love by Ind.ie under GNU AGPLv3 or later.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#	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 = """
31 32 33
		╔════════════════════════════════════════════════════════════════════════════════════╗
		║    Better Builder development-time static site running at http://localhost:3000    ║
		╚════════════════════════════════════════════════════════════════════════════════════╝
34 35
	"""
	console.log serverMessage