Hosting a competition on surge.sh
...by adding an EVENT.json file to the root of your project.
Hosting an event on surge is very simple. It's three easy steps.
- Publish a project to Surge to your root domain (eg.
surge ./myproject superevent.io) - Point
superevent.ioand*.superevent.ioDNS records to surges servers. - Add
EVENT.jsonfile with the following properties...
{
"name" : "Super Event",
"start" : "2016-05-03T09:00",
"end" : "2016-05-14T17:00",
"twitter" : "@superevent",
"email" : "sally@superevent.io",
"webhook" : "http://example.com:1337",
"slackhook" : "https://hooks.slack.com/services/asdf/123/abcdefg"
}note: all EVENT.json values are optional
namethe name of your event.startwhen participants can begin to publish.endwhen publishing closes.twittertwitter account for event.webhookwebhook url for post publish hooks.slackhooslack web hook integration url
Thats it. You are now hosting an event on surge!
Add a slackhook property to get super useful info into any slack channel you like.
Your participants can now publish to <subdomain>.super.sintaxi.com
note: Events work on root domains as well.
Example of a webhook server:
var http = require('http')
var express = require('express')
var bodyParser = require('body-parser')
var app = express()
// parse application/json
app.use(bodyParser.json())
app.use(function (req, res, next) {
console.log(req.body) // output hook data!
next()
})
http.createServer(app).listen(1337)
console.log('Server running at http://example.com:1337/')Test your webhook server:
curl -H "Content-Type: application/json" -X POST -d '{"hello":"world"}' http://example.com:1337



What exactly do you mean by a competition though? When I saw event, my first thought was just that, an "event". So I have a static web site for a local children's museum and they are having an event next week. I'm guessing this isn't related to that at all?
What exactly is being sent to slack/webhook? You say notifications, but notifications of what exactly?
I feel like I'm missing something really obvious here. :)