# API Setup

Please ensure that [<mark style="color:blue;">Prerequisites</mark> ](/getting-started/prerequisites.md)have been installed before proceeding with the API Setup

**Step 1** - Extract Source code, you will find api folder, then open your project directory terminal and give below commands

> ```
> $ npm install
> ```

**Step 2** - Set up [<mark style="color:blue;">Environment configuration</mark>](broken://pages/NLb51xsRBPfK2hVPdikQ)

**Step 3** - Import Spurtcommerce.sql(which is in your api folder) in your database and give username,password, database name in `.env file`.

**Step 4-** To run the project give the following command in your terminal

> ```
> $ npm start serve
> ```

{% hint style="info" %}
To build the Spurtcommece api for the server deployment, run the following command in project directory

```
$ npm run build
```

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spurtcommerce.com/getting-started/development-and-setup/api-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
