Written by
My personal experience migrating my Next.js application to the new `app` router.
Hello stranger! In this article I will show you how I made my blog serverless with Next.js and MDX.
Hello stranger! In this article I will show you how I made my blog serverless with Next.js and MDX.
Today was released the first stable version of Asterism. Asterism provides a CLI to manage your Lyra instances and searches in a simple way.
Lyra is a search engine created by Michele Riva. Lyra makes thousands searches within a few microseconds (μs) (yes, ms / 1000).
The main idea of Lyra is to provide a search engine that can be used in all devices that JavaScript can run: web, mobile, desktop, TVs, etc. Everywhere!
Asterism is a CLI tool that helps you to convert your database instances (MySQL and PostgreSQL) into Lyra instances and to create searches in a simple way.
You can install Asterism using npm|yarn|pnpm
:
npm install -g @mateonunez/asterism
Asterism provides a simple CLI to manage your Lyra instances and searches.
To create a new Lyra instance you can use the migrate
command:
asterism migrate postgres -d postgres -t posts
This command will create a new Lyra instance from a PostgreSQL table. You can also use the option to create a new Lyra instance from a MySQL table.
mysql
A new persistent Lyra instance will be created in the provided folder. (default is /out
).
To make a search you can use the search
command:
asterism search "cool"
This command will search the provided string in all the Lyra instances and will return the results.
Example:
$ asterism search "cool"
[2022-11-26 14:26:49.844] INFO: Resolving asterism.
[2022-11-26 14:26:50.032] INFO: Searching on asterism.
[2022-11-26 14:26:50.034] INFO:
instance_one: {
"count": 0,
"elapsed": 225799,
"hits": []
}
instance_two: {
"count": 1,
"elapsed": 931864,
"hits": [
{
"id": 1,
"title": "Cool title",
"content": "Cool content"
}
]
}
Asterism is an open source project and you can contribute to it. You can find the source code in GitHub.
You can also contribute to Lyra. You can find the source code in GitHub.