ContentTranslation is a tool that allows editors to translate pages from one language to another with the help of machine translation and other translation tools.
This is the server component of ContentTranslation.
Install the dependencies:
$ npm install
$ node Server.js
$ npm start
Following step is to be performed only once. You might have to use sudo
.
$ npm link .
Subsequently, just use following to start the server.
$ cxserver
Then browse to http://localhost:8080/
. You'll see the server playground
page.
You need to provide SSL certificate to start the server over secure mode.
$ node Server.js --secure --key key.pem --cert cert.pem
Following step is to be performed only once. You might have to use sudo
.
$ npm link .
Subsequently, just use following to start the server.
$ cxserver --secure --key key.pem --cert cert.pem
Then browse to https://localhost:8080/
. You'll see the server playground
page.
An default configuration file is given as config.defaults.js. Local changes in config.js will override the defaults. Restart server to read changes.
To run the ContentTranslation server:
$ npm run-script debug
It will open Chrome developer tools with the ContentTranslation source code. You can debug the code just like a web application. You can also edit the code and save from the debugger.
To run the tests:
$ npm test
To run individual test:
$ node tests tests/path/to/individual/test