Jinaga runs both on the server and in the browser, so that it can exchange facts between the two. This starter kit uses Webpack to bundle both sides. It also demonstrates how to update a React user interface with Jinaga.
Find out more about Jinaga, TypeScript, Webpack, and React.
The easiest way to use this starter kit is to export it with Subversion.
svn export https://github.com/jinaga/starter-typescript-react.git/trunk myapplicationIf you don't have Subversion installed, then you can go to the GitHub page and download the zip file.
Once you have the code, run:
npm installJinaga saves its facts in PostgreSQL. The easiest way to start up a database is to use Docker.
docker run -d --name jinaga-postgres -p5432:5432 -e POSTGRES_PASSWORD=secretpw -e APP_USERNAME=dev -e APP_PASSWORD=devpw -e APP_DATABASE=myapplication jinaga/jinaga-postgres-fact-keystoreFor complete instructions, see Jinaga PostgreSQL Setup.
To run in development mode:
npm run devThis will watch the source code for changes and rebuild as necessary. It will restart the server to load those changes.
To build for release:
npm run buildThis creates a dist folder with the server-side code in server.js, and the client-side code in scripts/index-xxxxx.js.
It also creates an HTML file in views/index.html with a script tag that loads the client-side code.
To run:
npm startBuild something incredible!