- Notifications
You must be signed in to change notification settings - Fork0
SaymV/scalatra-bootstrap
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a starter application for anyone who wants to write an API layer usingScalatra. Why start here?If you're serious about API development, you'll have configs to load, JSON will be necessary, and security will be paramount.Instead of using theScalatra project generator,clone this repository for a head start.This app demonstrates how to return JSON, verify the origin and authorization Token.
Instead of the vanilla scalatra project generator, use this project to gain the following functionality out of the box:
- Logging
- Typesafe Config
- Jackson JSON
- Swagger Support
- Okta Authentication
In thesrc/main/resources folder, there is aresource.conf file that looks like this:
base_url ="localhost"okta {domain:"yourOktaDomain"audience:"api://default"timeout:1000}
Copy the contents of that file, name itapplication.conf, and replace your Okta domain.
$cd back-end$ sbt> jetty:start> browse
Ifbrowse doesn't launch your browser, manually openhttp://localhost:8080/ in your browser.
If actively developing, use to have sbt watch for changes.
~;jetty:stop;jetty:start
Okta has great tutorials around Spring and generic java. I thought it might be useful to have a scala based example.
Feel free to make a pull request if you add basic functionality that would help a fledgling APIon its way to being production ready.
:)
About
Boilerplate Scalatra API with Json, Swagger Documentation, and Okta Authentication
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.