An application is the end point of the Phovea platform implementing an interface for the user. For example, Ordino is an application plugin.
This tutorial requires you to complete the following steps / tutorials (with links):
mkdir name_of_new_app
cd name_of_new_app
yo phovea:init-app
and follow the prompts.npm install
npm run build
The build step is optional since it is not required for testing/development.
The build process itself includes:
npm start
Here we assume that you want to create a client side app, called myapp
, that speaks to a server side app myapp_server
. The workspace directory is called myapp_workspace
. Note that plugins must always be lowercase.
Create the client side as follows:
myapp_workspace
mkdir myapp
cd myapp
yo phovea:init-app
and follow the prompts. This initializes a new client app.cd ..
If you have an existing phovea client side app, you can just clone that repository into this directory.
Create the server side as follows:
mkdir myapp_server
cd myapp_server
yo phovea:init-slib
and follow the prompts. The promt asks you for your application's name, put in myapp
. This initializes a new server app.cd ..
Clone and resolve the phovea_server
as follows:
yo phovea:clone phovea_server
and follow the prompts.yo phovea:workspace
If you are developing against the develop
branch (which is very likely), you must also switch the repository to the develop
branch.
yo will resolve all dependencies for you. If you, however, want to also edit things like phovea_core
at the same time, you can just check it out and switch it to the right branch:
yo phovea:clone phovea_core
cd phovea_core
git checkout develop
If you want to change any phovea plugins, you should first create a new feature branch. Don't commit directly to develop or master.
Keep Docker running.
npm install
docker-compose build
Keep Docker running.
docker-compose up -d
npm run start:myapp
Now in the browser check adress http://localhost:8080/
for accessing the app or http://localhost:8080/api/hello_world/
for accessing the API.