Skip to content

ldaniels528/scalajs.io-todomvc

Repository files navigation

Todo MVC

This is an example implementation of TodoMVC, which was developed to showcase typical usage of the Transcendent.js platform (a Scala.js implementation of the Node SDK and MEAN stack).

For more details, please refer to the documentation of the original project:

https://github.com/tastejs/todomvc

This project is comprised of 3 sub-projects:

  • AngularJS project (angularjs)
  • NodeJS project (nodejs)
  • A common project (commonjs) for shared classes

Building the code

Build Requirements

NOTE: You'll also need to have a working installation of the Node package manager (npm) and bower.

Building the application

Prior to building the code, you need to install the bower and node modules. NOTE: You only need to perform this step once.

$ cd app-nodejs
$ npm install
$ bower install
$ cd ..

Now, you can compile the Scala.js sources to JavaScript by executing the following command:

$ sbt clean "project nodejs" fastOptJS

NOTE: If you'd like continuous compilation (to recompile as you change the source code) then do the following instead:

$ sbt clean "project nodejs" "~ fastOptJS"

Running the application

$ cd ./app-nodejs
$ node ./server.js    

NOTE: To run Node if development mode, do the following instead:

$ cd ./app-nodejs
$ NODE_ENV=development node ./server.js    

The above will startup the application on port 1337 by default. To listen/bind to a different port. Set the "port" environment variable.

$ NODE_ENV=development port=8000 node ./server.js

Then (re)start the application.

About

Todo MVC example for ScalaJs.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published