Coder Social home page Coder Social logo

homesite's Introduction

Homesite

Build and Run

  1. Get the bun.
  2. cd frontend and then:
    1. bun i && bun run build to build the frontend part.
    2. nohup bun run start --port 3001 > bun.log 2>&1 & to start the frontend server.
  3. cd backend and then:
    1. cp .env.example .env and edit it.
    2. bun i.
    3. ./ctl.ts dev run-postgres-in-docker to run the database.
    4. ./ctl.ts dev deploy-db-migrate to apply those database migrations.
    5. nohup bun run serve > bun.log 2>&1 & to start the backend server.

Then you need a proxy to serve the static files (built from frontend) and the backend. Here is an example of Caddyfile:

homesite.peterlits.com {
    handle /api/v1/* {
        reverse_proxy localhost:3000
    }

    handle {
        reverse_proxy localhost:3001
    }
}

Run by Docker

$ docker build -t homesite .
# Remove the flag about host network
$ docker run --net host --env-file=<your-env-file> homesite

homesite's People

Contributors

peterlitszo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.