Created
June 18, 2014 16:51
-
-
Save callahanrts/bd64453aace421271a26 to your computer and use it in GitHub Desktop.
The server that is created to accept notifications from the chrome extension
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
@app = express(); | |
@app.use(bodyParser()) | |
@app.all '/*', (req, res, next) -> | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With"); | |
next(); | |
server = @app.listen 51932, () -> | |
console.log('Listening on port %d', server.address().port); | |
@app.post '/new', (req, res) => | |
@setNotifications(req.body.messages) | |
res.send("success!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment