Skip to content

Instantly share code, notes, and snippets.

@rodionbykov
Last active August 29, 2015 14:27
Show Gist options
  • Save rodionbykov/704d4619c2c957eaa4a0 to your computer and use it in GitHub Desktop.
Save rodionbykov/704d4619c2c957eaa4a0 to your computer and use it in GitHub Desktop.
FW/1 REST API
variables.framework = {
//define routes
routes = [
{ "$GET/users/$" = "/users/list" },
{ "$GET/users/:id/$" = "/users/get/id/:id" },
{ "$POST/users/$" = "/users/create" },
{ "$DELETE/users/:id/$" = "/users/delete/id/:id" }
{ "$POST/users/login/$" = "/users/login" },
]
// register bean factory
function setupApplication(){
var bf = new org.corfield.ioc('model');
setBeanFactory(bf);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment