Mono Connect
A quick introduction to building with Mono connect

Table of contents
1. Clone the repository
Using HTTPS:
$ git clone https://github.com/withmono/quickstart.git
$ cd quickstart
Alternatively, if you use ssh:
$ git clone [email protected]:withmono/quickstart.git
$ cd quickstart
$ cp .env.example .env
Copy .env.example
to a new file called .env
and fill out the environment variables inside. Add your REACT_APP_MONO_PUBLIC
and MONO_SECRET
. Get your Client ID and secrets from
the dashboard: https://app.mono.co/apps
NOTE:
.env
files are designed for development only. Never run a production application with an environment file that contains secrets.
Pre-requisites
make
command in your terminal: https://formulae.brew.sh/formula/make- Docker installed and running on your machine: https://docs.docker.com/get-docker/
- Your environment variables in a
.env
file as noted above - If using Windows, a working Linux installation on Windows 10. If you are using Windows and do not already have WSL or Cygwin configured, we recommend running without Docker (it's easier than installing WSl or Cygwin).
Running
There are three make
commands available
up
: builds and starts the containerlogs
: tails logs for running applicationstop
: stops the container, you can also use the Docker GUI
Each of these should be used with a language
argument, which is node
. If unspecified, the default is node
.
Start the container
$ make up language=node
The quickstart backend is now running on http://localhost:8080 and the frontend on http://localhost:3000.
If you change the contents of the server files or .env
file, simply run make up language=node
to rebuild and restart the server.
If you experience a Docker connection error when running the command above, try the following:
- Make sure Docker is running
- Try running the command prefixed with
sudo
View the logs
$ make logs
Stop the container
$ make stop
- The language you intend to use is installed on your machine and available at your command line.
This repo should generally work with active LTS versions of each language such as node >= 14 - Your environment variables populated in
.env
- npm
- If using Windows, a command line utility capable of running basic Unix shell commands
Scripts are located in the main directory for your convenience.
./setup.sh
Run to install the required dependencies.
./start_node.sh
This will run both the front and node backend simultaneously in a single convenient terminal.
Once started with one of the commands below, the quickstart will be running on http://localhost:8080 for the backend. Enter the additional commands in step 2 to run the frontend on http://localhost:3000.
$ cd ./node
$ npm install
$ npm start
$ cd ./frontend
$ npm install
$ npm start
Next steps
You have successfully finished the Mono Quickstart, congrats! From this point on, we encourage you to alter the Quickstart code in order to experience using the Mono API. You now have a few options for movement:
You can proceed to the Use cases page for a mapping of typical use cases to matching products if you're unsure of which Mono products you want to use.
Updated 18 days ago