Skip to content

mxenabled/mx-quickconnect

Repository files navigation

MXquickconnect

MXquickconnect is a sample application which anyone can clone and use their MX client credentials to interface with common MX use cases using Platform API and the javascript widget. It is meant to help a developer see a sample of what MX has to offer while at the same time providing some frontend and backend code which can be extracted into any application.

⚠️ This is only for Platform API users

Table of contents

1. Clone the repository

Using ssh (recommended):

git clone [email protected]:mxenabled/mx-quickconnect.git

Using GibHub CLI:

gh repo clone mxenabled/mx-quickconnect

Using HTTPS:

git clone https://github.com/mxenabled/mx-quickconnect

2. Set up development environment

cp .env.example .env

Create a .env file at the same level as the .env.example. Add your CLIENT_ID and API_KEY. You can find these values in your MX Client Dashboard

3. Run the MXquickconnect app

There are two ways of running this app: with or without Docker. If you would like to orchestrate with Docker, skip to the Run with Docker section below.

Run without Docker

1. Running the backend

You can choose to run one of the following backend implementations. Once started the backend will be running on http://localhost:8000


Backend (Ruby)

cd ruby
bundle install
./start.sh

Backend (Node.js)

cd mx-platform-node
npm install
npm start

Backend (Python)
cd python
pip3 install -r requirements.txt
./start.sh

Backend (AspNet)

Make sure you have dotnet sdk 6 or later installed.

cd mx-platform-aspnet-core
dotnet add package MX.Platform.CSharp
dotnet run

2. Running the frontend

The frontend will run on http://localhost:3000 and will send api requests to http://localhost:8000.

Make sure you have npm version 7 or later installed.

cd frontend
npm install
npm start

Run with Docker

Make sure you have docker comunity 20.10.13 and docker compose 2.3.4 or later installed.

Edit your docker-compose.yml file:

  1. Remove or comment out backends you would not like to run
  2. Uncomment the DOCKER_PROXY_URL that corresponds to the backend you're using
  3. Make sure you have at least one backend, one DOCKER_PROXY_URL, and the frontend
docker-compose up

Open your browser on http://localhost:3000 and enjoy!