Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appstrap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appstrap

This probably already exists in NPM somewhere, but I want this module for a cage match I'm going into

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

This probably already exists in NPM somewhere, but I want this module for a cage match I'm going into

Just a crappy little bootstrapper

Spawns a process, passes in the PORT environment variable and waits for the server to become ready so you can do end-to-end-tests on it

Usage

var Appstrap = require('appstrap') , instance = new Appstrap('app.js')

instance.start(function() { console.log("Server is listening, you can make http requests to", instance.root_path, "as the server is listening on port", instance.port)

instance.stop()

})

Browser = require 'zombie'
Appstrap = require 'appstrap'

Scenario "Bootstrapping my application", ->
  app = null
  client = new Browser()

  Given "An express application", ->
    app = new Appstrap('app.js')

  When "Spawning it up", (done) ->
    app.start done

  Then "I can run some tests against it", (done) ->
    client.visit app.root_url, ->
      client.text('title').should.equal('hello world')
      done()

  after -> app.stop()

FAQs

Package last updated on 06 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc