Skip to content

seyhadot/rails-api-template

 
 

Repository files navigation

Rails api Templates

Quickly generate a rails api with devise and JWT authetication using Rails Templates.

Usage

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

Just run

cd  YOUR_PROJECT_NAME
rails s

and you're all set & ready to sketch your database models :)

Curl request returns JWT token (To test that devise default user is working fine)

curl --request POST \
  --url http://localhost:3000/api/v1/user/sign_in \
  --header 'content-type: application/json' \
  --data '{
"user": {
		"email": "[email protected]",
		"password": "password"
	}
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%