 		)
 		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

			@app.use errorHandler
			# 404 handler
			@app.use notFoundHandler

	startServer : () ->
		log.info "Setting up routes"
		@setupRoutes()
		log.info "Starting server on #{CONFIG.port}"
		@app.on 'error', (e) ->
			log.error e
		@app.listen CONFIG.port

server = new InfolisWebservice()
server.startServer()

			htmlView: 'triples'
			schemo: TSON.load __dirname + '/../data/infolis.tson'
		)
		@app.schemo.once 'ready', =>
			# 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
			doneSetupExpress()

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