Skip to content

Boilerplate for creating scala restful api backend, typescript frontend with npm, and postgres. Everything in its own isolated container for development.

Notifications You must be signed in to change notification settings

albertocruz6/scala-npm-postgres-docker-boilerplate

 
 

Repository files navigation

Boilerplate repo for INSO-4XXX Class Using typescript&React for Front End, Scala for backend, and Postgres for DB

References

Pre-requisites

For Web Application:

For Native Applications:

For Web Application

This Section is for teams who have decided to make a website as their front end

  • Always run make commands from the root directory of the boilerpalte

  • All Source Code should be written in front-end-web

  • First clone this repo to your desired location

  • Run the setup command:

    make setup
  • Then install al dependancies. If you add any new dependancy to the package.json in front-end-web run this command again:
    make install_web
  • To build app and run all parts of the system run:(This will startup docker and create your db, your scala restful api, and your front-end server
  • Scala: localhost:8080, WebApp: localhost:3000, Db: localhost:5432
    make dev_web
  • Remove all images and docker containers from system:
    make down
  • To start only the scala-api and not the front-end server:
    make start_scala

For Native Applications:

This Section is for teams who have decided to make a Native App as their front end

  • Always run make commands from the root directory of the boilerpalte

  • Install all dependancies first:

    make install_mobile
  • To start both mobile dev server and scala-api:
    make dev_native
  • To start only mobile dev server:
    make start_mobile_only
  • To Stop scala-api:
    make stop_scala
  • To start only the scala-api and not the front-end server:
    make start_scala

Other Information

  • If you need to change port numbers, environment variables or anything else you can do that in the docker-compose.yml file
  • There you will find all services that are ran in docker containers, what ports are exposed and the environment variables defined
  • Please note that this docker-compose.yml file is built for development only
  • You have to create another docker-compose with the appropiate settings for deployment

Recommended IDEs or text editor:

  • You can use visual studio code with the Docker, scala and git extensions
  • You can use any text editor and a terminal
  • You can use IntelliJ for scala app

You can use both if you plan on doing both a native app and a website

About

Boilerplate for creating scala restful api backend, typescript frontend with npm, and postgres. Everything in its own isolated container for development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • XSLT 71.7%
  • CSS 14.9%
  • TypeScript 7.1%
  • Scala 4.1%
  • Makefile 1.6%
  • Dockerfile 0.4%
  • JavaScript 0.2%