-
Notifications
You must be signed in to change notification settings - Fork 6
Quick Guide Setup
NOTE: We recommend the nvm installation to use node without sudo
command.
Required:
npm install -g karma-cli gulp-cli browserify
To setup the Hyperty development (starter project), make sure you have nodeJS available in your environment, perform the steps below. In case you want to use Hyperties in your Application please read this tutorial. NOTE for Windows Users: You should use "Windows PowerShell" and not the standard command line.
-
download the latest release; NOTE: this repository is read only. Your Hyperties Source Code should be hosted somewhere else (see below step 2);
-
run the command
npm install
(this may take some minutes) -
Create the folder that will contain your Hyperty source code Side by side with toolkit folder. We strongly recommend you to use the "official" Hyperty repository by cloning dev-hyperty. IN case you prefer to use something else, you must create a sub-folder "src" where your Hyperty source code will be stored (
<foldername>/src
) and a sub-folder "examples" containing demos/tests for your hyperties. -
run the local http-server and catalogue with
npm run start:browser
ornpm run start:node
in case you are developing Hyperties for NodeJS. A list of folders that are side by side with the toolkit folder will be presented. Select the one you have created in previous step to contain your hyperty source. You also have an mode which can start the toolkit without environment restrictions withnpm run start:all
Note:
If you are in linux, probably you will have problems running the
npm run start:browser
ornpm run start:node
because you will need thesudo
privileges, so, you can solve this problem with this command:sudo setcap 'cap_net_bind_service=+ep' `which node`
-
Check the following url's to allow the certificates:
- Open
https://localhost
with your favorite browser and select your Hyperty to execute.
In case you already have docker installed you can use it together with docker-compose.
-
install docker - see here
-
install docker-compose - see here, if you are using windows or Mac OS you can install docker-toolbox, see here
-
You can configure the service on docker-compose.yml file
IP - by default the service run on ip 172.18.0.32 on port 443
ENVIRONMENT VARIABLES
by default the environment variables are:
Toolkit develoment mode -
true
when used in a local development environment,false
when used at the backend.`- DEVELOPMENT=true`
RUNTIME_URL - where the Runtime is loaded from
- RUNTIME_URL=hyperty-catalogue://hysmart.rethink.ptinovacao.pt/.well-known/runtime/Runtime
Domain - the domain where Message Node and Domain Registry services are hosted
- DOMAIN=localhost
Hyperty Repo - variable with the Hyperty source code repository.
- HYPERTY_REPO=/tmp/dev-hyperty
VOLUMES - define here is your dev-hyperty repository
../dev-hyperty:/tmp/dev-hyperty | note if you need, change only the first part of configuration;
-
After all instalation process and configuration, go to your command line and run:
docker-compose up hyperty-toolkit
Usage: docker-compose up [options] [SERVICE...] OPTIONS: -d Detached mode: Run containers in the background, print new container names.
-
Some usefull commands
docker-compose logs -f hyperty-toolkit
- to see all the logs of servicedocker-compose build hyperty-toolkit
- to rebuild the servicedocker images
- list all imagesdocker rmi <id>
- remove image with ;