@@ -11,8 +11,8 @@ For a matching model-driven Web UI, use [Evolutility-UI-React](http://github.com
11111 . [ Installation] ( #Installation )
12122 . [ Setup] ( #Setup )
13133 . [ Configuration] ( #Configuration )
14- 4 . [ Models] ( #Models )
15- 5 . [ API] ( #API )
14+ 4 . [ Models] ( #Models ) : [ Object ] ( #Object ) - [ Field ] ( #Field ) - [ Collection ] ( #Collection )
15+ 5 . [ API] ( #API ) : [ Get ] ( #API_Get ) - [ Update ] ( #API_Update ) - [ More ] ( #API_Extras )
16166 . [ License] ( #License )
1717
1818
@@ -59,7 +59,7 @@ npm start
5959
6060** Note** : The database creation and population scripts are logged in the files "evol-db-schema-{datetime}.sql" and "evol-db-data-{datetime}.sql".
6161
62- In a web browser, go to the url [ http://localhost:2000/api/v1/evolutility/todo ] ( http://localhost:2000/api/v1/evolutility/todo ) .
62+ In a web browser, go to [ http://localhost:2000/api/v1/ ] ( http://localhost:2000/api/v1/ ) for REST or [ http://localhost:2000/graphql ] ( http://localhost:2000/graphql ) for GraphQL .
6363
6464
6565<a name =" Configuration " ></a >
@@ -70,7 +70,7 @@ Configuration options are set in the file [config.js](https://github.com/evolute
7070
7171| Option | Description |
7272| ---------------| -----------------------------------------|
73- | apiPath | Path for REST API (i.e.: "/api/v1/evolutility/ "). |
73+ | apiPath | Path for REST API (i.e.: "/api/v1/"). |
7474| apiPort | Port for REST API (i.e.: 2000). |
7575| connectionString | DB connection string (i.e.: "postgres://evol: love @localhost:5432/evol"). |
7676| schema | DB schema name (i.e.: "evolutility").|
@@ -91,7 +91,7 @@ Configuration options are set in the file [config.js](https://github.com/evolute
9191To be accessible by the REST API, each database table must be described in a model.
9292Models contain the name of the driving table and the list of fields/columns present in the API.
9393
94-
94+ < a name = " Object " ></ a >
9595### Object
9696
9797| Property | Description |
@@ -103,7 +103,7 @@ Models contain the name of the driving table and the list of fields/columns pres
103103| titleField | Field id for the column value used as record title. |
104104| searchFields | Array of field ids for fields used to perform searches. |
105105
106-
106+ < a name = " Field " ></ a >
107107### Field
108108
109109| Property | Description |
@@ -125,7 +125,7 @@ Models contain the name of the driving table and the list of fields/columns pres
125125| deleteTrigger | Deleting records in the lovTable will trigger a cascade delete (this property is only used while creating the database). |
126126
127127
128-
128+ < a name = " Collection " ></ a >
129129### Collection
130130
131131Multiple Master-Details can be specified with collections.
@@ -142,6 +142,7 @@ Multiple Master-Details can be specified with collections.
142142Example of collection in [ Wine cellar] ( https://github.com/evoluteur/evolutility-server-node/blob/master/models/pim/winecellar.js ) .
143143
144144
145+ <a name =" SampleModel " ></a >
145146### Sample model
146147
147148Below is the model for a To-Do app.
@@ -209,9 +210,9 @@ Evolutility-Server-Node provides a generic RESTful API for CRUD (Create, Read, U
209210The API is inspired from [PostgREST](http://postgrest.com).
210211
211212When running Evolutility-Server-Node locally, the url for the "todo" app is
212- [http://localhost:2000/api/v1/evolutility/todo](http://localhost:2000/api/v1/evolutility/todo).
213-
213+ [http://localhost:2000/api/v1/todo](http://localhost:2000/api/v1/todo).
214214
215+ <a name="API_Get"></a>
215216### Requesting Information
216217
217218#### Get One
@@ -313,6 +314,7 @@ GET /todo?format=csv
313314` ` `
314315Notes: In the returned data every object has an extra property "\_ full_count" which indicate the total number of records in the query (before limit).
315316
317+ <a name="API_Update"></a>
316318### Updating Data
317319
318320#### Record creation
@@ -358,6 +360,7 @@ DELETE /<model.id>/<id>
358360DELETE / todo/ 5
359361` ` `
360362
363+ <a name="API_Extras"></a>
361364### Extras endpoints
362365
363366In addition to CRUD, Evolutility-Server-Node provides a few endpoints for Charts, Lists of values, file upload, and API discovery.
0 commit comments