Skip to main content

Running the application

For this Lab, you will use CodeSandbox as your development environment. CodeSandbox is an online code editor and prototyping tool that makes creating and sharing web apps faster.

Create a CodeSandbox account

Start by creating a free CodeSandbox account if you don't have one already.

You can create a CodeSandbox account by clicking on the "Try for Free" button in the top right corner of the CodeSandbox website.

Follow the instructions to create your account.

Open the Search Lab sandbox

danger

There is a small bug with CodeSandbox that prevents you to fork the repository if you don't already have an account. Make sure the follow the instructions in the previous step before continuing.

Once you have created your CodeSandbox account, you can open the Search Lab sandbox by clicking on the following link:

Atlas Search Lab on CodeSandbox

Fork the sandbox

Once the sandbox is open, you will need to fork it to your account so that you can save your changes.

To fork the sandbox, click on the "Fork" button in the top right corner of the CodeSandbox window.

Once you have your own fork, you will be able to start running the Lab.

Explore

Take a few minutes to explore the application.

From the left navigation bar, you will see two folders: "client" and "server".

The "client" folder contains the React application that you will be using. If you aren't familiar with React, don't worry as you shouldn't need to do any changes here.

The "server" folder contains the Node.js server. This is where you will be making changes to implement the Atlas Search queries.

From the "server" folder, open the "index.mjs" file. This is the main file for the Node.js server.

On the right panel, you should see the application running. There are two tabs on this panel "start client:3000" and "start server:5000".

The first tab is the React application and the second tab is the Node.js server.

Since the server isn't returning data yet, the React application won't display any results when you search for something. However, in the server window, you should see a message indicating that the server is up and running.