Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateonunez/platformatic-orama
Platformatic performed with Orama
https://github.com/mateonunez/platformatic-orama
fastify orama platformatic
Last synced: 11 days ago
JSON representation
Platformatic performed with Orama
- Host: GitHub
- URL: https://github.com/mateonunez/platformatic-orama
- Owner: mateonunez
- License: mit
- Created: 2022-10-05T19:19:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T18:24:03.000Z (about 1 year ago)
- Last Synced: 2024-11-08T10:05:23.666Z (2 months ago)
- Topics: fastify, orama, platformatic
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Platformatic with Orama
The services exposes two routes:
- `/orama/:author` - returns a list of all the posts that matches the `author` query param using [Orama](https://github.com/OramaSearch/orama)
- `/mapper/:author` - returns a list of all the posts that matches the `author` query param using the native [@platformatic/sql-mapper](https://www.npmjs.com/package/@platformatic/sql-mapper)## Usage
```bash
$ npm install
```Create a new migration file in `database/migrations/001.do.sql`.
```sql
CREATE TABLE quotes(
id INTEGER PRIMARY KEY,
author VARCHAR(255) NOT NULL,
quote TEXT NOT NULL
)
``````bash
$ npm run platformatic:migrate
$ npm run platformatic:seed
$ npm start
```# License
[MIT](/LICENSE)