Skip to content

Instantly share code, notes, and snippets.

@belohlavek
Last active December 2, 2017 00:11
Show Gist options
  • Save belohlavek/c5d2bbfeceae179ac7ec68af52b00bf7 to your computer and use it in GitHub Desktop.
Save belohlavek/c5d2bbfeceae179ac7ec68af52b00bf7 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: "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": "Untitled project",
"mainScript": "scripts/main.dwl",
"apiled": {
"deploymentId": "fcac4586-6f9b-4930-8fae-f4ee00bea949",
"domain": "locurapop"
}
},
"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