Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Latest commit

 

History

History
68 lines (40 loc) · 1.77 KB

README.md

File metadata and controls

68 lines (40 loc) · 1.77 KB

Sangraha Frontend

Sangraha frontend is a single page application created using Preact. Preact is a lightwright React alternative.

Development Instructions

Pre-requisites

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.

Using 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

Install yarn

For linux, follow instructions here yarn installation.

alternatively in OSX,

brew install yarn

Install Dependencies

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 Development Server

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.

Build for production

To build the application for deployment (minified static files), use the following:

npm run build

Start Production Server

npm run serve

Preact-CLI

The frontend was bootstrapped using Preact-CLI. For further instructions, and detailed explanation on how things work, checkout the CLI Readme.