Adding canReuse to MD-SAL simple app providers
[toolkit.git] / README.md
1 # OpenDaylight Toolkit
2
3 App Web Development with NodeJS
4 -------------------------------
5
6 1) web/src/main/java/org/opendaylight/toolkit/web/CorsFilter.java and replace *your-ip* (e.g. http://localhost:8000)
7
8 2) mvn clean install project's root directory
9
10 3) Go to simple/ and issue mvn clean install
11
12 4) Run the controller main/target/main-osgipackage/opendaylight/run.sh
13
14 5) In a new window, go to node/ and run the node server *node server.js*
15
16 >Note: you may need to install missing modules *npm install module_name*
17
18 6) Go to http://your-ip:8000 in your browser and start developing from simple/
19
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
21
22 >Note: ensure bower components are installed for web/, refer to section below
23
24
25 Quick HowTo
26 -----------
27
28 1) Go to <code>main/archetypes/archetype-app-simple</code> and run <code>mvn install</code> to install the simple archetype
29
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>
31
32 >**groupId:** *org.bar.foo* <code>&lt;or any package name&gt;</code>
33
34 >**artifactId:** *simple* <code>&lt;or any artifact name&gt;</code>
35
36 >**version:** <code>&lt;press enter, default&gt;</code>
37
38 >**package:** <code>&lt;press enter, default&gt;</code>
39
40 >**REST-Resource-Name** *simple* <code>&lt;or any resource name&gt;</code>
41
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>
43
44 >Note: you may need to install bower on your system using <code>npm -g install bower</code>
45
46 >Note: [tip for setting up Node.js and npm on Mac](http://shapeshed.com/setting-up-nodejs-and-npm-on-mac-osx/)
47
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 
50
51 5) Then go into one of the apps you just generated and issue <code>mvn install</code> to install that bundle
52
53 6) Then start the controller under <code>main/target/main-osgipackage/opendaylight</code> and <code>./run.sh -console</code>
54
55 7) *[optional]* If you installed the bower components, you can access the toolkit web UI at <code>http://localhost:8080</code>
56
57
58 Troubleshooting
59 ---------------
60
61 Please visit the wiki for more information
62
63 https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main