A MongoDB must be running. In development we are looking at 127.0.0.1:27017
,
in any other environment, the environment variable MONGO_URL
has to be defined.
rake db:seed
Import some data in the databaserake console
Interactive console in the environment of the application (Access to database)rake daoclient:exec
Interactive prompt to use the DSL of the DAOrake daoclinet:exec [file]
Interpret the file with the DSLrake restclient:exec <service_URL>
Same as DAO client but for a webservicerake restclient:exec <service_URL> [file]
rake daoclient:exec
rake daoclient:exec [file]
-> Note: One example could be found in the 'examples' directory
rake restclient:exec <service_URL>
rake restclient:exec <service_URL> [file]
GETALL
GET <id>
FINDBYNAME name
CREATE attr1, "value1", attr2, "value2", …
UPDATE <id>, attr1, "value1", …
DELETE <id>
The keywork 'last' can substitute an ID and it represents the last item which has been get/create i.e.:
GET <id>
UPDATE last, name, "New name"
DELETE last
Note: The application uses an interface to GNU readline to provide an history in the commands you run.
To run the server: rackup -p $PORT
Gemfile
: Define the dependencies of the applicationGemfile.lock
: Generated by the commandbundle install
, contains the dependency treeProcfile
: Define how to run the server on a PaaS like Appsdeck or HerokuRakefile
: Define some "batch" tasks which can be runconfig.ru
: Specify a standard way to launch the application as a Rack-compliant web serviceconfig/mongoid.yml
: Configuration of mongoid, the gem used to connect to a MongoDB database