 		)
 		if not @app.mongoose
 			throw new Error("Must set the MongoDB connection for API")
+		@app.mongoose.on 'connected', doneSetupMongoose
 		@app.mongoose.on 'error', (e) =>
 			log.error "ERROR starting MongoDB"
 			throw e
+
+	setupExpress : (doneSetupExpress) ->
+		# Very important, that next one
+		@app.set('case sensitive routing', true)
 		# Schemo!
 		@app.schemo = new Schemo(
 			mongoose: @app.mongoose

			htmlView: 'triples'
			schemo: TSON.load __dirname + '/../data/infolis.tson'
		)
		# JSON-LD Middleware
		@app.jsonldMiddleware = @app.schemo.expressJsonldMiddleware
		# JSON body serialization middleware
		@app.use(BodyParser.json(
			limit: 10 * 1024 * 1024
		))
		# CORS (Access-Control-Allow-Origin)
		@app.use(Cors())
		# Static files
		@app.use(Express.static('public'))
		# Jade
		@app.set('views', './views')
		@app.set('view engine', 'jade')
		# Forward proxy remote address
		@app.set("trust proxy", 'loopback')
		# Make it easy for routes to add swagger docs
		@app._swagger = {}
		@app.swagger = (endpoint, def) ->
			return @_swagger if not (endpoint and def)
			log.debug "Adding swagger for #{endpoint}"
			@_swagger[endpoint] = def

	setupRoutes : () ->
		# @app.http().io()
		# Store site information
		@app.use (req, res, next) ->

	constructor: (@port) ->
		log.silly "Configuration", CONFIG
		@app = Express()
		@app.on 'error', (e) ->
			log.error "Express error:", e

	setupMongoose: (doneSetupMongoose) ->
		# Start DB
		@app.mongoose = Mongoose.createConnection(
			CONFIG.mongoURI
