Dujour is a JSON/CSV data file server. It supports any usecase in which simple transformation of JSON and CSV data to a web consumable JSON REST API is a requirement. Dujour was developed with Morpheus Option Lists in-mind, providing a way to host data for those lists, internally on the private network.
You can find the latest software here.
- Automatic self-signed TLS certificate (or use your own)
- Supports CSV files. Application will parse them to JSON
- Supports any number of JSON or CSV data files, memory being the only constraint
- Hot reload. New or edited data can be added with no server restart needed
- Data is served from memory. Fast
Add .json
and .csv
data files to the data
directory and Dujour will automatically load, validate and serve each data file at two REST API endpoints in JSON format.
In each data file, element/row data should contain an id
key/column which should be unique in the dataset.
Data is loaded and served from an in-memory cache. No restart of the server is required when adding new data. Adding a new file of same name will cause the cache to be cleared and the data reloaded.
The filename of each data file determines the API endpoints which are created. For example, for a file named users.json
(not case sensitive), Dujour will serve data at two endpoints:-
This endpoint will retrieve all users:
GET $serverUrl:18651/users
This endpoint will retrieve a specific user:
GET $serverUrl:18651/users/$id
Grab the tar.gz or zip archive for your OS from the releases page.
Unpack it to the target host, and then start the server.
./dujour
Or with nohup..
nohup ./dujour &
To update the application server, stop the server, replace the binary, then start the server.
- Dujour does not perform mutations on the data files. Only
GET
operations are supported.
- Support CRUD operations on the data
- Run the application as a service
Licensed under Mozilla Public License 2.0