Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tranquangvu/go-rails-api
https://github.com/tranquangvu/go-rails-api
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tranquangvu/go-rails-api
- Owner: tranquangvu
- License: mit
- Created: 2023-03-05T08:50:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T02:05:40.000Z (23 days ago)
- Last Synced: 2024-10-21T05:24:14.823Z (23 days ago)
- Language: Ruby
- Size: 88.9 KB
- Stars: 1
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Golden Owl Solutions Rails API Boilerplate
A boilerplate for quickly setting up a Ruby On Rails RESTful API:
- Ruby 3.3.0
- Rails 7.1.2
- PostgreSQL Database## Getting Started
**Installation**
- Use ruby `3.3.0`
```bash
rbenv install 3.3.0
rbenv local 3.3.0
ruby -v
```
- Install packages:
```bash
gem install bundler
bundle install
```
- Add `config/database.yml` - refer `config/database.yml.sample`
- Add `.env` - refer `.env.sample`
- Generate new rails master key
```bash
rm -f config/credentials.yml.enc && rm -f config/master.key && EDITOR=vim bin/rails credentials:edit
```
- Database setup:
```bash
bin/rails db:setup
```
- Start server:
```bash
bin/rails s
bundle exec sidekiq
```**Specs**
```bash
bundle exec rspec
```Check the coverage at `coverage/index.html`
**API document**
```bash
bin/rake rswag
```Check the generated document at `http://localhost:3000/docs`
**Security vulnerability scanner**
```bash
bundle exec brakeman
```**Linter with rubocop**
```bash
bundle exec rubocop
```## License
Licensed under the MIT license, see the separate [LICENSE.md](./LICENSE.md) file.