Skip to content

Mirror of the OpenDaylight Toolkit project

Notifications You must be signed in to change notification settings

opendaylight/archived-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenDaylight Toolkit

App Web Development with NodeJS

  1. web/src/main/java/org/opendaylight/toolkit/web/CorsFilter.java and replace your-ip (e.g. http://localhost:8000)

  2. mvn clean install project's root directory

  3. Go to simple/ and issue mvn clean install

  4. Run the controller main/target/main-osgipackage/opendaylight/run.sh

  5. In a new window, go to node/ and run the node server node server.js

Note: you may need to install missing modules npm install module_name

  1. Go to http://your-ip:8000 in your browser and start developing from simple/

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

Note: ensure bower components are installed for web/, refer to section below

Quick HowTo

  1. Go to main/archetypes/archetype-app-simple and run mvn install to install the simple archetype

  2. Go to the project root directory and generate an app using the simple archetypes you just installed mvn archetype:generate -DarchetypeCatalog=local

groupId: org.bar.foo <or any package name>

artifactId: simple <or any artifact name>

version: <press enter, default>

package: <press enter, default>

REST-Resource-Name simple <or any resource name>

  1. [optional] Install the necessary web bower components, under directories web/src/main/resources/js and web/src/main/resources/css issue bower install

Note: you may need to install bower on your system using npm -g install bower

Note: tip for setting up Node.js and npm on Mac

  1. [important] Install the base controller, within project root directory (where common, main, web are located) issue mvn install

Note: This may take a while if you're on a new system

  1. Then go into one of the apps you just generated and issue mvn install to install that bundle

  2. Then start the controller under main/target/main-osgipackage/opendaylight and ./run.sh -console

  3. [optional] If you installed the bower components, you can access the toolkit web UI at http://localhost:8080

Troubleshooting

Please visit the wiki for more information

https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main