How to set up your development project
It is quite easy to get started developing towards a Twinfinity portal. In this brief article you will find a step by step, how to set up your project and what you need to get everything up and running.
Prerequisites
There are some things you need to get sorted before you can start developing towards a Twinfinity portal. For your convenience we’ve listed them here:
certificate.key and certificate.pem files
client-id which is an ID that is provided by Twinfinity. Reach out to your local Twinfinity contact to acquire one.
IDP-url (typically bim.[your portal url]/idp
Steps to set up your project.
Setting up your project is easy ising the twinfinity-templates. This npm package will help you set up everything you need, from authentication to loading your first model. It will provide you with a solid starting point for your Twinfinity digital twin project. Here are the steps needed to get a development project started towards a Twinfinity portal:
Open your favourite IDE
Install twinfinity templates
“npm install -g @twinfinity/templates”Create a directory for your project.
Open your IDE and in the terminal enter
“twinfinity-templates typescript <project directory>”Add your “certificate.key” and “certificate.pem” file to your project directory.
In your IDE, open a terminal:
cd <project directory>
npm install
npm run serve
Your project is now running and can be seen in a browser at localhost:9000