Windows: https://github.com/coreybutler/nvm-windows
Then use nvm to install the version of node specified under package.json
's "engines"
field.
https://docs.mongodb.com/manual/installation/
Windows: https://github.com/microsoftarchive/redis
Can be anything. Used by one of our third-party packages for maintaining user sessions (staying logged in even when you refresh the page).
There's a few commands needed to start the appropriate databases and servers. They are shown in package.json
under "scripts"
.
Runs the create-react-app development server, which is what serves the page you'll load by going to http://localhost:3000 in your browser.
This server exists only for development. In production, the page is served by the same node backend server that serves the HTTP API (described below).
Runs the mongo server so the app can connect to the mongo database that holds all the backend data, like events and users.
Note: On Linux, run npm run stop-mongo-dev
when you're done developing, to stop the mongo daemon.
Note: On Windows, we don't need a command to start MongoDB because the default install of MongoDB on Windows creates a Service, which keeps a MongoDB server running in the background for us automatically.
Run the redis server so the app can connect to the redis database that manages user auth sessions.
Note: On Windows, we don't need a command to start Redis because the default install of Redis on Windows creates a Service, which keeps a Redis server running in the background for automatically.
Run the node backend server, which is what serves the HTTP API.
In production, the node backend server serves the HTTP API as well as the page itself, but in development the create-react-app development server serves the page.
To connect to local Redis instance, run redis-cli -n 1
in a Terminal (connects to redis database number 1. redis databases don't have names, they have numbers). Defaults to host of localhost
and port of 6379
.
Count the total number of keys with info keyspace
. List all the keys with keys *
.