Sangraha frontend is a single page application created using Preact. Preact is a lightwright React alternative.
Node.js is required to develop the frontend. To install Node.js and npm (Node Package Manager) either follow the official instructions or use nvm.
Install nvm
following the instructions here nvm installation.
Then install the stable version of node
and npm
. At the time when this was written the LTS
version for Node was 8.12.0
.
nvm install 8.12.0
For linux, follow instructions here yarn installation.
alternatively in OSX,
brew install yarn
Head to the directory where this README.md file is located and install all development dependencies using npm:
npm install
This downloads all the dependencies locally in node_modules
directory.
Start the development server using the following command:
npm run dev
This will start local development server at localhost:8080
. The development server has hot-reloading enabled and any changes reflect in the browser once the files are saved.
To build the application for deployment (minified static files), use the following:
npm run build
npm run serve
The frontend was bootstrapped using Preact-CLI. For further instructions, and detailed explanation on how things work, checkout the CLI Readme.