Local App | http://localhost:3000 |
Production App | https://static-sites-with-authentication.fly.dev |
Fly Stats | https://fly.io/apps/static-sites-with-authentication |
mkdir -p ~/Projects && git clone git@github.com:marian13/static_sites_with_authentication.git
cd ~/Projects/static_sites_with_authentication && task install
-
Run the following command:
cd ~/Projects/static_sites_with_authentication && task backend:start
-
Open http://localhost:3000 in your browser.
NOTE: Static sites are NOT hot-reloaded.
-
For example, for the
code_notes
static site, the command looks like so:cd ~/Projects/static_sites_with_authentication && task static_sites:code_notes:start
-
Open http://localhost:8000 in your browser.
NOTE: Hot-reloaded code_notes
server has no backend access.
-
Check how the
static_sites:code_notes:build
command is implemented and used in the Taskfile. -
Adjust the regular expression in the config/routes.rb.
-
Add new static site by analogy.
-
Open Rails console:
cd ~/Projects/static_sites_with_authentication && bundle exec rails console
-
Execute the command below:
User.create!(email: "user@example.com", password: "secret")
-
Don't forget to replace email and password.
- Task.