Go to file
Adam Townsend 21eeb9db72
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit Details
use version instead of date
2023-10-24 18:01:15 -07:00
db/migrations
features
spec
views
.gitignore
.rubocop.yml
Gemfile
Gemfile.lock
Jenkinsfile use version instead of date 2023-10-24 18:01:15 -07:00
README.md
VERSION
app.rb
config.ru

README.md

simple url shortener

this project is a simple solution to build out a URL shortener using Roda, Puma, Sequel, and SQLite on a FreeBSD Jail

the point of this project is to quickly build something and work on continuous deployment while making small refinements to the functional pieces.

the outside pieces of software that this project relies on are rbenv, ruby-build, sqlite3, and pkgconf.

first you have to install the dependencies:

bundle install

if you want to skip the test dependencies:

bundle config set --local without 'test'

then create a .env.rb file in the root directory that contains the following ENV attributes:

ENV["APP_SESSION_SECRET"] = {output of a random 64 byte secret}

ENV["DB_NAME"] = {DB_NAME}

after the dependencies are installed, you have to create the db and schema

sequel -m db/migrations sqlite://db/{DB_NAME}

to start the application with Puma:

rackup -o {ip address} -p {port}

to run it as a daemon:

rackup -o {ip address} -p {port} -D