RailsServer
Generic boilerplate server made in RubyOnRails to start new projects.
Install
-
Install rvm from: Installing RVM
-
Install Ruby with rvm
$ rvm install "ruby-2.6.6"
-
Install Rails 5.2.4.4
-
Git clone this project
-
Isntall bundle
$ gem install bundle
-
Enter in project dir an update gems with:
$ bundle update
-
Install libv8 On macOS:
brew install v8
On Linux
sudo apt-get install libv8-dev
-
Migrate db
$ rake db:migrate
-
Seed database
$ rake db:seed
This will create and admin user (dani_vela@me.com , password: 123456)
-
Run the server
$ bundle exec rails server
-
Open a browser and open
http://localhost:3000/admin
url. -
To see swagger doc open
http://localhost:3000/api-docs/index.html
url
Testing
Launch tests with command:
$ rails t
This project contains
- Devise (for user authentication and registering)
- simple_token_authentication (for token authentication)
- rails_admin (db administration)
- cancancan (authorization management)
- Swagger api, ui and specs
ActiveStoreage (Rails 5.0) for file upload
Use the model Airline as a sample for uploading files
New users
Create new user with http://localhost:3000/users/sign_up
Instructions to change the name of the project
Change all occurrences of "RailsServer" string to your project name
This string appears in this files:
- app/views/layouts/application.html.erb
- config/appication.rb
- config/initializers/session_store.rb