Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 2.44 KB

README.md

File metadata and controls

92 lines (70 loc) · 2.44 KB

Simple App

For some definition of simple

This repo provides a modern web application template that uses Rails for your classic MVC server-client relationship and SvelteJS for interactive JS components.

Dev Setup

Either Linux, WSL (Windows Subsystem for Linux), or Mac will work best.

Tools

  • Git
  • Ruby (3.2.0-preview1): Recommended via rbenv
  • NodeJS (LTS 16.15.1): Recommended via nvm
  • Docker (If using WSL on Windows, install will default to the WSL2 engine - use this)
  • The Heroku CLI - used as our local process runner.

Setup

  1. Clone the repo.

    SSH

    git clone [email protected]:kyle-rader/simple-app
    

    HTTPS

    git clone https://github.com/kyle-rader/simple-app
    
  2. Confirm you have bundle and npm on your path (installed with Ruby, and NodeJS).

  3. Install the Rails gem globally.

    bundle install rails
    
  4. Install ruby dependencies

    bundle install
    

    Note that you may need to install libpq-dev in order to install the pg (Postgres) gem.

    On Linux or WSL this can be done with

    sudo apt install libpq-dev
    
  5. Install JS dependencies

    npm install
    
  6. Ensure docker-compose is installed (it should come with docker).

  7. Bring up a Postgres instance in the background with

    docker-compose up -d
    
  8. Create and migrate the database

    rails db:reset
    
  9. Launch the rails web server and the vite dev server

    npm start
    

    Note this just calls heroku local -f Procfile.dev simulating a Heroku deployment. You could also use the foreman gem for this.

Demo App

Coming Soon

The Stack

TBD

Road Map

  • Create initial app with inertia-rails and vite-rails
  • TBD

General

  • Heroku Deployment
  • Azure Deployment guide?
  • AWS Deployment guide?
  • Digital Ocean Deployment guide?