Skip to content

Instantly share code, notes, and snippets.

@matiasbargas
Forked from belohlavek/__inputs__payload.json
Last active November 30, 2017 22:10
Show Gist options
  • Save matiasbargas/8234949e82a3166629546e4678d021f7 to your computer and use it in GitHub Desktop.
Save matiasbargas/8234949e82a3166629546e4678d021f7 to your computer and use it in GitHub Desktop.
Untitled project
import * from dw::http::Server
var serverConfig =
{
"host": "0.0.0.0",
"port": 8080,
"contentType": "application/json"
}
---
api(serverConfig,
{
"/": {
GET: (request) -> {
body: "hello world!"
}
},
"/.+": {
GET: ((request) -> serveResource(request.path))
}
}
)
{
"project": {
"name": "Untitled project",
"mainScript": "scripts/main.dwl"
},
"meta": {
"projectFileVersion": "0.1.0",
"creationDate": "11/29/2017"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment