Go to file
Adam Townsend 5abf07d0c7 rubocop formatting fixes 2023-10-22 13:07:07 -07:00
db/migrations frozen string literal for rubocop 2023-10-22 13:06:12 -07:00
features added tests for invalid URL entries 2023-10-12 23:42:04 -07:00
spec rubocop formatting fixes 2023-10-22 13:07:07 -07:00
views fixed vertical scrolling issue with page and margin top on main 2023-10-05 13:55:09 -07:00
.gitignore updated README, swapped Falcon for Puma for now, and ignored more files 2023-10-17 21:53:12 -07:00
Gemfile added rubocop 2023-10-22 13:05:43 -07:00
Gemfile.lock added rubocop 2023-10-22 13:05:43 -07:00
Jenkinsfile set up to run with only the freebsd and ruby labeled agent(s) 2023-10-18 13:08:41 -07:00
README.md updated README, swapped Falcon for Puma for now, and ignored more files 2023-10-17 21:53:12 -07:00
app.rb added URL validation to webpage part 2023-10-12 23:42:52 -07:00
config.ru require the .env file to load ENV variables set in there 2023-10-03 15:58:01 -07:00

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