examples: annotate examples
[nit.git] / lib / popcorn / examples / angular / example_angular.nit
index ba7f4f2..0da9194 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This is an example of how to use angular.js with popcorn
+module example_angular is example
+
 import popcorn
+import popcorn::pop_json
 
 class CounterAPI
        super Handler
@@ -40,5 +44,5 @@ end
 
 var app = new App
 app.use("/counter", new CounterAPI)
-app.use("/*", new StaticHandler("www/"))
+app.use("/*", new StaticHandler("www/", "index.html"))
 app.listen("localhost", 3000)