Skip to content

Instantly share code, notes, and snippets.

@belohlavek
Last active December 1, 2017 22:21
Show Gist options
  • Save belohlavek/931dd2653f1daa7c413efb4844601cd0 to your computer and use it in GitHub Desktop.
Save belohlavek/931dd2653f1daa7c413efb4844601cd0 to your computer and use it in GitHub Desktop.
test5
{
"message": "Hello world!"
}
import * from dw::http::Server
import * from dw::http::Client
---
api({
host: "localhost",
port: 8080
}, {
"/test": {
GET: (request) -> {
body: {
name: "It works 2"
}
},
POST: (request) -> {
body: {
//TODO: Remove as String
name: (request).body.name as String
},
status: 302
}
}
})
{
"project": {
"name": "test5",
"mainScript": "scripts/main.dwl",
"apiled": {
"deploymentId": "bbb9e1c9-35ca-4a7d-b606-e7f8bc91785e",
"domain": null
}
},
"meta": {
"projectFileVersion": "0.1.0",
"creationDate": "12/01/2017"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment