Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mingderwang/my-bun-elysia-with-test
template for learning bun and test with bun.
https://github.com/mingderwang/my-bun-elysia-with-test
bun elysia programming testing
Last synced: about 2 months ago
JSON representation
template for learning bun and test with bun.
- Host: GitHub
- URL: https://github.com/mingderwang/my-bun-elysia-with-test
- Owner: mingderwang
- License: mit
- Created: 2023-11-13T02:40:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-16T07:07:30.000Z (about 1 year ago)
- Last Synced: 2024-01-27T04:02:55.926Z (12 months ago)
- Topics: bun, elysia, programming, testing
- Language: TypeScript
- Homepage: https://test-onjd.onrender.com/
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Elysia with Bun runtime
## Getting Started
To get started with this template, simply paste this command into your terminal:
```bash
bun create elysia ./elysia-example
```## Development
To start the development server run:
```bash
bun run dev
```Open http://localhost:3000/ with your browser to see the result.
## Testing
To run tests and show coverage:
```bash
bun test
```## Deployment (with docker)
To create a Dockerfile if you have none.
```
FROM oven/bun:1
WORKDIR /app
COPY . .
RUN bun install
ARG PORT
EXPOSE ${PORT:-3000}
CMD ["bun", "server.ts"]
```
then```
docker build -t my-bun-elysia-example . # Build the Docker image
docker run --rm -it -p 3000:3000 my-bun-elysia-example # Run the Docker image// to push to docker hub for deployment to render
docker login -u
docker build -t /my-bun-elysia-example .
docker push /my-bun-elysia-example
```refer to https://render.com/