Use bun for web3proxy and webui

This commit is contained in:
2025-12-13 17:46:25 +07:00
parent c4e444347c
commit 588927678c
16 changed files with 6692 additions and 11326 deletions

View File

@@ -2,12 +2,12 @@
The aim of this repository is to provide a concrete example of a Fastify application using what are considered best practices by the Fastify community.
**Prerequisites:** You need to have Node.js version 22 or higher installed.
**Prerequisites:** You need to have Bun version 1.3 or higher installed.
## Getting started
Install the dependencies:
```bash
npm install
bun install
```
### Database
@@ -23,54 +23,54 @@ docker compose up -d
To create and update the database schema, run the migrations:
```bash
npm run db:migrate
bun run db:migrate
```
To populate the database with initial data, run:
```bash
npm run db:seed
bun run db:seed
```
### TypeScript
To build the project:
```bash
npm run build
bun run build
```
### Start the server
In dev mode:
```bash
npm run dev
bun run dev
```
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
In production mode:
```bash
npm run start
bun run start
```
### Testing
To run the tests:
```bash
npm run test
bun run test
```
### Standalone
`dev` and `start` leverage [fastify-cli](https://github.com/fastify/fastify-cli),
but you can run the demo as a standalone executable (see [server.ts](./src/server.ts)):
```bash
npm run standalone
bun run standalone
```
### Linting
To check for linting errors:
```bash
npm run lint
bun run lint
```
To check and automatically fix linting errors:
```bash
npm run lint:fix
bun run lint:fix
```
## Learn More