A React-based SPA (single page application that serves as the frontend for TextCritical.net)
Run yarn install
to get the frontend ready to be executed.
You can run the front-end code using yarn start
. However, this will not run the backend endpoints necessary for the app to run. To get a running version of the app, you will need to do one of the following:
By default, webpack.dev.js
is configured to assume that TextCritical is running locally. It can be run locally with Docker or run locally by running the Django app directly.
Alternatively, the public instance of TextCritical can be used by modifying webpack.dev.js
to use textcritical.net:
proxy: {
'/api': {
target: 'https://textcritical.net:443',
secure: true,
changeOrigin: true,
},
'/work_image': {
target: 'https://textcritical.net:443',
secure: true,
changeOrigin: true,
},
'download/work': {
target: 'https://textcritical.net:443',
secure: true,
changeOrigin: true,
},
},
You will need to install nodeJS. Apt on Ubuntu will often give you an older version of nodeJS. You can install a later version by running the following:
sudo apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
Once you do that, install some other things:
sudo apt install yarn npm