Manual Installation
Create
mochi.cr
in initalizers and paste this in:Create a migration and paste in:
Granite:
```sql -- +micrate Up CREATE TABLE users ( id INTEGER NOT NULL PRIMARY KEY, email VARCHAR, password_digest VARCHAR, created_at TIMESTAMP, updated_at TIMESTAMP );
Migrate:
Granite:
or
Jennifer:
Create a controller titled
user_controller.cr
and paste in this file:Create a controller titled
session_controller.cr
and paste in this file:Add these to your routes:
Change
pipeline :web
topipeline :web, :auth
and add:Create an
:auth
pipeline with:Create a new route section just for
:auth
:Add this to your
:web
routes:Create a piple titled
authenticate.cr
and paste in this file:Copy & Paste all the views found here:
Open
config/application.cr
and between the# Start Generator
&# End Generator
add:Open
application_controller.cr
and add:Done! And that's why we have a CLI.
Last updated
Was this helpful?