Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# app.coffee
require 'express'
class Server
constructor: ->
@app = express()
@server = http.createServer(@app)
@io = SocketIO.listen @server, logger: @logger
@configure_app()
start: (done) =>
@server.listen 3000
done?()
stop: (done) =>
@server.stop done
configure_app: =>
...
# spec/requests/login_page_spec.coffee
Server = require '../../app'
describe 'Login Page', ->
beforeAll (done) ->
@server = new Server
@server.start done
...
afterAll (done) ->
@server.stop done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.