Last active
December 15, 2015 00:09
-
-
Save apaleslimghost/5170947 to your computer and use it in GitHub Desktop.
Simulate import•io's backend in holding mode.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require \http .create-server (req,res)-> | |
status = | |
| req.url is '/' => 200 | |
| otherwise => 503 | |
res.write-head status,"Service Unavailable" { | |
"Content-Type": "application/json; charset=UTF-8" | |
"Connection": "close" | |
"X-Powered-By": "PHP/5.3.10-1ubuntu3.4" | |
"Server": "Apache/2.2.22 (Ubuntu)" | |
"Content-Length": 66 | |
} | |
res.end '{"error":"We are down for maintenance. BRB!","code":"MAINTENANCE"}' | |
.listen 8001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment