To install dependencies:
bun install
To run:
bun run dev
Build the image:
docker build -t weave-backend .
Run the container:
docker run -d -p 3000:3000 --name weave-backend weave-backend
The API will be available at http://localhost:3000
After making changes to the code, rebuild and restart the container:
# Stop the running container
docker stop weave-backend
# Remove the old container
docker rm weave-backend
# Rebuild the image
docker build -t weave-backend .
# Start a new container
docker run -d -p 3000:3000 --name weave-backend weave-backend
To restart the container without rebuilding:
docker restart weave-backend
To stop and remove the container:
# Stop the container
docker stop weave-backend
# Remove the container
docker rm weave-backend
# Optionally, remove the image
docker rmi weave-backend
To view container logs:
# Follow logs in real-time
docker logs -f weave-backend
# View last N lines
docker logs --tail 100 weave-backend