A Hoplon project with Castra designed to show optmistic render on the client side while asynchronously calling the server for validation. This project also has tests using purnam.test and double-check, which are run on Karma.
The client pools the server each second for a random word and shows the last 10 words. The user can submit new words, which will appear on the list immediately and submited to the server.
The server has an artificial delay of 2 seconds before returning a response. If the word has more than 6 characteres the server will tell that is a invalid word and the client will show in a different manner valid and invalid words.
-
Start the auto-compiler. In a terminal:
$ boot dev
-
Go to http://localhost:8000 in your browser.
You need to install karma and some plugins before running the tests. In a terminal:
npm install karma karma-jasmine karma-chrome-launcher karma-firefox-launcher
You should also install karma-cli because it makes your life easier. In a terminal (you may need sudo):
npm install -g karma-cli
Now to run the tests:
-
Start the auto-compiler. In a terminal:
$ boot test
-
Start the karma runner. In another terminal:
$ karma start
-
When you save a file, hoplon will auto compile and then karma will auto run the tests.
Copyright © 2014, Marcelo Nomoto. All rights reserved.
The use and distribution terms for this software are covered by the Eclipse
Public License 1.0 (http://opensource.org/licenses/EPL-1.0) which can
be found in the file epl-v10.html at the root of this distribution. By using
this software in any fashion, you are agreeing to be bound by the terms of
this license. You must not remove this notice, or any other, from this software.