Quickly generate a rails api with devise and JWT authetication using Rails Templates.
rails new \
--database postgresql \
--skip-sprockets --skip-listen --skip-javascript --skip-turbolinks --skip-test --skip-system-test --skip-webpack-install \
--api \
-m https://raw.githubusercontent.com/zakaryaa/rails-api-template/master/rails-api-template.rb \
YOUR_PROJECT_NAME
cd YOUR_PROJECT_NAME
rails s
and you're all set & ready to sketch your database models :)
curl --request POST \
--url http://localhost:3000/api/v1/user/sign_in \
--header 'content-type: application/json' \
--data '{
"user": {
"email": "[email protected]",
"password": "password"
}
}'