updated README, swapped Falcon for Puma for now, and ignored more files
parent
360ddbe6d2
commit
dd5caa4056
|
|
@ -3,3 +3,5 @@
|
||||||
*.db
|
*.db
|
||||||
.env.rb
|
.env.rb
|
||||||
coverage
|
coverage
|
||||||
|
vendor
|
||||||
|
.ruby-version
|
||||||
|
|
|
||||||
20
README.md
20
README.md
|
|
@ -1,11 +1,11 @@
|
||||||
# simple url shortener
|
# simple url shortener
|
||||||
|
|
||||||
this project is a simple solution to build out a URL shortener using
|
this project is a simple solution to build out a URL shortener using
|
||||||
Roda, Falcon, Sequel, and SQLite
|
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 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 sqlite3 and pkgconf.
|
the outside pieces of software that this project relies on are rbenv, ruby-build, sqlite3, and pkgconf.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -14,9 +14,9 @@ first you have to install the dependencies:
|
||||||
`bundle install`
|
`bundle install`
|
||||||
|
|
||||||
|
|
||||||
if you want the development group included run this first:
|
if you want to skip the test dependencies:
|
||||||
|
|
||||||
`bundle config set --local with 'development'`
|
`bundle config set --local without 'test'`
|
||||||
|
|
||||||
|
|
||||||
then create a .env.rb file in the root directory that contains the following ENV attributes:
|
then create a .env.rb file in the root directory that contains the following ENV attributes:
|
||||||
|
|
@ -24,15 +24,19 @@ then create a .env.rb file in the root directory that contains the following ENV
|
||||||
```
|
```
|
||||||
ENV["APP_SESSION_SECRET"] = {output of a random 64 byte secret}
|
ENV["APP_SESSION_SECRET"] = {output of a random 64 byte secret}
|
||||||
|
|
||||||
ENV["DB_NAME"] = {db file name}
|
ENV["DB_NAME"] = {DB_NAME}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
after the dependencies are installed, you have to create the db
|
after the dependencies are installed, you have to create the db and schema
|
||||||
|
|
||||||
`sequel -m db/migrations sqlite://db/{DB_NAME}`
|
`sequel -m db/migrations sqlite://db/{DB_NAME}`
|
||||||
|
|
||||||
|
|
||||||
to start the application with Falcon:
|
to start the application with Puma:
|
||||||
|
|
||||||
`rackup -o {ip address} -p {port} -s falcon`
|
`rackup -o {ip address} -p {port}`
|
||||||
|
|
||||||
|
to run it as a daemon:
|
||||||
|
|
||||||
|
`rackup -o {ip address} -p {port} -D`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue