https://github.com/joakin/loot
Backend server for mobile restbase html
https://github.com/joakin/loot
Last synced: 5 months ago
JSON representation
Backend server for mobile restbase html
- Host: GitHub
- URL: https://github.com/joakin/loot
- Owner: joakin
- Created: 2015-10-23T07:25:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-22T18:22:22.000Z (over 9 years ago)
- Last Synced: 2025-05-31T05:21:58.842Z (about 1 year ago)
- Language: JavaScript
- Size: 343 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
loot
====
A simple Node.js service that aggressively transforms RESTBase content for
consumption by lightweight web apps.
 
## Frozen/Deprecated
This server is not used any more, refer to the following links to an open
source more production ready service:
* https://en.wikipedia.org/api/rest_v1/?doc
* https://github.com/wikimedia/mediawiki-services-mobileapps
### Improvements to be done
* Fix space usage
* Evict previous cache revisions when getting a new one
* Gracefully avoid cache when ENOSPC and log errors
* Make the cache LRU and implement periodic eviction
## Endpoints
### Api
* `/slim/[title]`
* `/slim/lead/[title]`
### Response
The `/slim/[title]` and `/slim/lead/[title]` endpoints respond with JSON in the following form:
```json
{
"sections": [
{
"title": "",
"content": "
This is the lead section
"
},
{
"title": "First section",
"content": "This is the first section
"
}
]
}
```
## Dev
* `npm install` to get the dependencies.
* `npm start` to run the server in development.