Live at math3d.org
This repository has three package.json files:
math3d-react/server/package.jsonserver dependencies and scriptsmath3d-react/client/package.jsonclient dependencies and scriptsmath3d-react/package.jsondeployment & development scripts
-
Install Mongodb: If it is not already installed, you'll need to install
mongodbas our database. On a Mac, we recommend installingmongodbwith Homebrew:```bash > brew tap mongodb/brew > brew install mongodb-community ```(Works with
mongodbv4.2.1; probably others, too.) -
Install Dependencies: Clone the git repo and
cdto package root, then run:```bash > npm install ```which installs both client and server dependencies.
-
Set Database Connection: Create a
.envfile in theserver/directory to setMONGO_URIdatabase connection environment variable. For local development, just copy the template:bash > cp server/dotenv_template server/.env -
Start the Database::
bash > npm run start-db -
Start Server & Client: In a new terminal window, start the server:
bash > npm start:dev:serverand, in a third terminal window, start the client app:bash > npm start:dev:client
The math3d-react app is now being served on http://localhost:3000/.