Sweets — future web framework
Flexible declarative web framework for real-time projects
- Focused on RESTful api
- Auto api routing generation
- No ORM
- JSON all the time
- API testing UI
Sweet is abstraction for one task. Here list of ready to use sweets
Best way to try sweets is to clone sample app and follow instruction from there.
Also all sweets available through npm.
Services is a command line interface. You can run services as
bin/sweets service command argument
create— creates db with name from settings
drop— drops db
updateScheme [resource]— updates scheme for all resources or just one.
dropScheme [resource]— drops scheme for all resources or just one.
rebuildIndexes [resource]— rebuilds indexes for all resources or just one.
create <resource>— creates a resource from template in a lib/resources folder
loadContent [jsonfilename]— loads content from all json files in a content folder or from file.
create <id> <password> [role]— creates user with id. For default sweets auth provider id is an email.
create <name>— creates custom service. For details see Custom services.
To create a new service use the
service create <name> service command. It makes services/name.js file. This is a simple class and every method can be run as
bin/sweets servicename methodname arg1 arg2 .... All methods get a callback as the last argument. Run this callback when the service is finished.
To make service available for cli add it in the loader of your app:
varSweetsLoadercallthis options "your_service_name" "another_custom_service";;
The GPLv3 License, see the included LICENSE.md file.