The commands are in the description down below and also in the GitHub repo linked down below.
Checkout my course(s) at: https://learn.deanin.com
Source:
https://github.com/Deanout/fast_ssl
README
This is a way to set up SSL fast for localhost in a Ruby on Rails 7 app.
The first command is required. Running the server is optional if you don't include the change to the config/puma.rb file. With the change to the puma file, you can just run a `rails s` and visit the port in your puma file (Defaulted to 3001) to see your https app. EX: By default it's set to 3001 in the puma file, so visiting https://localhost:3001 will be how you can use SSL.
Create SSL Cert
```sh
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -keyout localhost.key -out localhost.crt -subj "/CN=localhost" -days 365
```
Run Server
```sh
rails s -b "ssl://localhost:3000?key=config/ssl/localhost.key&cert=config/ssl/localhost.crt"
```
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
https://linktr.ee/deanin
If you liked this video, please consider subscribing: https://t.co/RZ4EwP0F2a
Timestamps
#Deanin #Software #Programming