mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-05 14:30:32 -05:00
decaffeinate: Rename ca.coffee and 11 other files from .coffee to .js
This commit is contained in:
committed by
Zach Bloomquist
parent
070fceff20
commit
84a2caa6e8
@@ -0,0 +1,24 @@
|
||||
http = require("http")
|
||||
Promise = require("bluebird")
|
||||
|
||||
srv = http.createServer (req, res) ->
|
||||
console.log "HTTP SERVER REQUEST URL:", req.url
|
||||
console.log "HTTP SERVER REQUEST HEADERS:", req.headers
|
||||
|
||||
res.setHeader("Content-Type", "text/html")
|
||||
res.writeHead(200)
|
||||
res.end("<html><body>http server</body></html>")
|
||||
|
||||
module.exports = {
|
||||
srv: srv
|
||||
|
||||
start: ->
|
||||
new Promise (resolve) ->
|
||||
srv.listen 8080, ->
|
||||
console.log "server listening on port: 8080"
|
||||
resolve(srv)
|
||||
|
||||
stop: ->
|
||||
new Promise (resolve) ->
|
||||
srv.close(resolve)
|
||||
}
|
||||
Reference in New Issue
Block a user