🥇
Get started
Welcome to the internal documentation section. This chapter is for developers working in Twake team or wanting to participate in the project.
If you are looking for the Developers API of Twake to make plugins, apps or connectors, go here : Developers API

Start your development server

The development server is a bit different than the production server. The idea is that you want your edited files to be executed by the docker-compose and so you must bind you local code directory to your docker-compose.yml.

Step 1 - Use the right docker-compose.yml

1
cd twake
2
cp twake/docker-compose.yml.dist.dev twake/docker-compose.yml
Copied!

Step 2 - Edit your configuration (optional)

You can for instance disable Elastic Search if you don't want to use it on development.
1
### Backend configuration
2
cd twake
3
cp backend/core/app/Configuration/Parameters.php.dist backend/core/app/Configuration/Parameters.php
4
nano backend/core/app/Configuration/Parameters.php
5
# Set es.host to false
Copied!

Step 3 - Start php and nginx to install dependencies

1
cd twake
2
docker-compose up -d php nginx
Copied!

Step 4 - Install dependencies

1
docker-compose exec php php composer.phar install #Could take some time
2
docker-compose exec nginx yarn install
3
docker-compose exec nginx yarn build
4
cd twake/backend/node; npm install; cd ../../../
Copied!

Step 5 - Run your local server

1
cd twake
2
docker-compose stop
3
docker-compose up -d
Copied!
You should now be able to access http://localhost:8000

Step 6 - Run the frontend with hot-reloading

It's better to have hot reloading while working on frontend. But we do not use the same port for docker and for hot reloading.
1
cd twake/frontend/
2
yarn start
Copied!
You should now be able to access http://localhost:3000 with hot reloading.
Last modified 10mo ago