Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-scalatra

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-scalatra

A Yeoman generator for Scalatra project

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

generator-scalatra

Build Status NPM version

Generates a basic structure for Scalatra REST Application and includes Casbah for MongoDB if you wish.

An example structure of generated project.

.
├── project
│   ├── build.properties
│   └── build.scala
|   └── plugins.sbt
├── README.md
├── sbt
├── src
    ├── main
    |   ├── resources
    |   └── scala
    |   |   ├── com
    |   |   |   └── example
    |   |   |       └── app
    |   |   |           └── controllers
    |   |   |               └── MessageController.scala
    |   |   └── ScalatraBootstrap.scala
    |   └── webapp
    |       └── WEB-INF
    |           └── web.xml
    └── test
        └── scala
            └── com
                └── example
                    └── app
                        └── controllers
                            └── MessageControllerSpec.scala

A generator for Yeoman.

Getting Started

What is Yeoman?

$ npm install -g yo

Usage

To install generator-scalatra from npm, run:

$ npm install -g generator-scalatra

Or search generator-scalatra under yeoman.

Make a new directory and cd into it:

mkdir new-project && cd $_

Finally, initiate the generator:

$ yo scalatra
If you selected MongoDB you need to have MongoDB running, if not you can skip this
$ mongod

Create db, collection and insert new message (Optional).

Application will use project name to create db, if the db doesn´t already exist.

$ mongo
> use <project name>
> db.createCollection('messages')
> db.messages.insert({body: 'Hello Mongo World!'})
Start and scan for changes:
$ ./sbt
> ~;container:start; container:reload /

Check it out at http://localhost:8080/messages

Run tests
$ ./sbt
> test

Changelog

This Changelog follows Semantic Versioning http://semver.org

  • 0.4.1 * Scalatra version upgraded to 2.2.2
  • 0.4.0 * Included option for Casbah and MongoDB * Minor fixes to files´ package paths
  • 0.3.2 * Fixed documentation
  • 0.3.1 * Minor refactoring
  • 0.3.0 * Add a 'controllers' folder * Renamed default servlet name * Improved documentation

License

MIT @ Peter Vilja

Keywords

FAQs

Package last updated on 21 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc