MyWay is a barebones Sinatra API framework with modular boilerplates... and it's super suave.
Its structure has been built out to be naturally quite opinionated. That being said however, the project's logic is easy enough to follow and can easily be modified to suit your needs.
If you want to use the MyWay CLI integration for MyWay, you can install it with:
$ gem install myway-cli
and run commands with using the myway
prefix.
You can use the CLI to generate a new project from a template with:
$ myway generate project example-project
Then finally have bundle installed and run it in the project directory:
$ bundle
Make sure you have versions of PostgreSQL and Redis installed as the framework uses these for model persistence and authentication tokens respectively.
To get the project running at localhost:3000
run:
$ myway run server
To test the project run:
$ myway run tests
For more information, tips, and ticks, see the MyWay CLI gem here
If you're not using the CLI, you can run any of the standard commands using the included Rakefile as follows:
$ rake run_myway
$ rake test_myway
[root]
|
|-[api]
| |-[auth]
| |-[v1] <- API files suffixed with `_api.rb`
|
|-[config] <- Configuration files for the application, models and webserver
|
|-[helpers] <- Helper files suffixed with `_helper.rb`
|
|-[models] <- Model files
|
|-[spec]
|-[auth]
|-[v1] <- Test files suffixed with `_spec.rb`
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
This project is available as open source under the terms of the MIT License.
Base App With Modular ControllersAPI Boilerplate ModuleUse Puma for ServerMake Heroku-ReadyAutomatic Code ReloadingController TestsSet Up TravisSet Up CodeClimateAdd ORMAdd User ModelCreate CLIAdd Authentication with Tokens- Add Self-Documenting API