Download the order-ahead sample application from GitHub and complete the following steps to configure the sample application for your environment.
Download the order-ahead sample application from GitHub.
In the root directory of the sample, create a copy of the .env.example file and name the new file .env.
In the .env file, replace the placeholder
SQUARE_SANDBOX_APPLICATION_IDvalues with the Sandbox credentials that you copied in Step 1: Get Developer Credentials.
The following shows an example of new values:
You can optionally set your production credentials; however, you work in the Square Sandbox for the rest of this tutorial.
When you've finished setting up your credentials, you can test the order-ahead sample application to confirm that you've authorized your application.
To test the order-ahead sample application:
Run the following command in the root directory of the order-ahead sample application:
Open localhost:3000 in your browser. If your sample application is set, you should see a gray screen with your business location name at the top.