Skip to content

Spray server with Angular front-end optimized for Heroku deployment

Notifications You must be signed in to change notification settings

jdschmitt/akka-angular-heroku

Repository files navigation

akka-angular-heroku

Seed project for akka http back-end with angular front-end (currently Angular 5) and configured for heroku

This project is a starting point to build a full-stack web application using Scala / Akka Http as the backend and Angular 5 as the front-end. It is configured in such a way as to allow for deployment to Heroku in a single dyno by following the steps below.

Follow these steps to get started:

  1. Git-clone this repository.

    git clone git://github.com/jdschmitt/spray-angular-heroku.git my-project

  2. Change directory into your clone:

    cd my-project

  3. Start the application:

    sbt compile run

  4. Browse to http://localhost:8080

  5. Start hacking on src/main/scala/com/example/MyService.scala for new APIs

  6. Start hacking in client folder for Angular app

Heroku

  1. heroku create my-project

  2. heroku buildpacks:set heroku/nodejs

  3. heroku buildpacks:add heroku/scala

  4. git push heroku master

  5. heroku open

Note: The order you add the buildpacks is important. NodeJS buildpack must be added first.

Other useful info

  • See Angular CLI docs for adding more components etc.
  • If you update the name in build.sbt then you must also update the file name of the target in Procfile to match
  • build.sbt adds a dependency to the Compile task which is responsible for building the Angular application.
  • Basic Specs2 tests included. Execute with sbt test
  • For Spray with Angular 2 front-end, check the spray-angular2 branch.
  • For Spray with Angular 4 front-end, check the spray-angular4 branch.

About

Spray server with Angular front-end optimized for Heroku deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published