Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sun-zhenxing/next-tldraw-client
Next.js + tldraw demo
https://github.com/sun-zhenxing/next-tldraw-client
nextjs nextjs14 typescript
Last synced: 9 days ago
JSON representation
Next.js + tldraw demo
- Host: GitHub
- URL: https://github.com/sun-zhenxing/next-tldraw-client
- Owner: Sun-ZhenXing
- License: mit
- Created: 2024-08-26T15:35:35.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-07T09:02:49.000Z (about 1 month ago)
- Last Synced: 2024-11-09T17:02:20.501Z (9 days ago)
- Topics: nextjs, nextjs14, typescript
- Language: TypeScript
- Homepage: https://draw.alexsun.top/
- Size: 336 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Next.js + tldraw
## Getting Started
Copy `.env.example` to `.env`:
```bash
cp .env.example .env
```Run the development server:
```bash
pnpm i
pnpm dev
```Open server:
```bash
git clone https://github.com/Sun-ZhenXing/fastify-tldraw-server.git
cd fastify-tldraw-server
pnpm i
pnpm dev
```## Build
Configure `.env.production`, then run:
```bash
docker build -t next-tldraw-client .
```Or use Docker Compose:
```bash
docker-compose up -d --env-file .env.production
```Nginx demo:
```nginx
server {
listen 80;
server_name tldraw.com;
location / {
proxy_pass http://127.0.0.1:3079;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
}server {
listen 5858;
server_name tldraw.com;
location / {
proxy_pass http://127.0.0.1:5879;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
```## License
This project is open source under the MIT protocol.
For the **tldraw** library you will need to purchase your own commercial license.