Metaphrase is a copy (writings, translations, etc.) manager that you can host on your server or computer.
To make sure you don't run into trouble, make sure you have both npm
and
libsqlite3-dev
installed on your computer, as they are requirements (for
building the frontend part and the storage part of Metaphrase).
make install
Configuration is made with environment variables:
DATABASE_URL=database.sqlite
DATABASE_BUSY_TIMEOUT=250
METAPHRASE_BIND=127.0.0.1:3000
make migratedb
make build
make run
To hack the frontend (after running make install
at least):
cd src/frontend
npm run dev
The frontend project is handled using ViteJS, so you
should have a very quick feedback loop on your changes. It's also configured
so it will mirror the calls to the backend engine as soon as it is run on
default URLs (backend on localhost:3000
and frontend on localhost:3100
).
Feel free to edit the src/frontend/vite.config.js
locally to change those
values.
So that you do not conflict with the development, use these environment variables:
export TEST_DATABASE_URL=test-database.sqlite
You can run the tests with make test
.
To run a specific test, use make test TEST=test_name
. Example:
make test TEST=api::v1::translations::tests::test_validate_with_success