3 App Web Development with NodeJS
4 -------------------------------
6 1) web/src/main/java/org/opendaylight/toolkit/web/CorsFilter.java and replace *your-ip* (e.g. http://localhost:8000)
8 2) mvn clean install project's root directory
10 3) Go to simple/ and issue mvn clean install
12 4) Run the controller main/target/main-osgipackage/opendaylight/run.sh
14 5) In a new window, go to node/ and run the node server *node server.js*
16 >Note: you may need to install missing modules *npm install module_name*
18 6) Go to http://your-ip:8000 in your browser and start developing from simple/
20 >Disclaimer: you may point node to any app you wish to develop on top of, not just simple, but that will have to be done manually for now
22 >Note: ensure bower components are installed for web/, refer to section below
28 1) Go to <code>main/archetypes/archetype-app-simple</code> and run <code>mvn install</code> to install the simple archetype
30 2) Go to the project root directory and generate an app using the simple archetypes you just installed <code>mvn archetype:generate -DarchetypeCatalog=local</code>
32 >**groupId:** *org.bar.foo* <code><or any package name></code>
34 >**artifactId:** *simple* <code><or any artifact name></code>
36 >**version:** <code><press enter, default></code>
38 >**package:** <code><press enter, default></code>
40 >**REST-Resource-Name** *simple* <code><or any resource name></code>
42 3) *[optional]* Install the necessary web bower components, under directories <code>web/src/main/resources/js</code> and <code>web/src/main/resources/css</code> issue <code>bower install</code>
44 >Note: you may need to install bower on your system using <code>npm -g install bower</code>
46 >Note: [tip for setting up Node.js and npm on Mac](http://shapeshed.com/setting-up-nodejs-and-npm-on-mac-osx/)
48 4) **[important]** Install the base controller, within project root directory (where common, main, web are located) issue <code>mvn install</code>
49 >Note: This may take a while if you're on a new system
51 5) Then go into one of the apps you just generated and issue <code>mvn install</code> to install that bundle
53 6) Then start the controller under <code>main/target/main-osgipackage/opendaylight</code> and <code>./run.sh -console</code>
55 7) *[optional]* If you installed the bower components, you can access the toolkit web UI at <code>http://localhost:8080</code>
61 Please visit the wiki for more information
63 https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main