Skip to content

Instantly share code, notes, and snippets.

@menduz
Last active December 2, 2017 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save menduz/47866c892767fa1400208f977b7c9736 to your computer and use it in GitHub Desktop.
Save menduz/47866c892767fa1400208f977b7c9736 to your computer and use it in GitHub Desktop.
Untitled project
{
"message": "Hello world!"
}
import * from dw::http::Server
import * from dw::http::Client
---
api({
host: "0.0.0.0",
port: 8080
}, {
"/": {
GET: (request) -> {
body: {
name: "It works"
}
},
POST: (request) -> {
body: {
//TODO: Remove as String
name: (request).body.name as String
},
status: 302
}
}
})
{
"project": {
"name": "Untitled project",
"mainScript": "scripts/main.dwl",
"apiled": {
"deploymentId": "5a6a71c7-186a-4c00-a917-56419fc9957b",
"domain": "menduz"
}
},
"meta": {
"projectFileVersion": "0.1.0",
"creationDate": "12/02/2017"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment