This is an imported repo from gitlab
Simple crud app with React + Ts (tailwind, tanstack - router, query, form)
Follow these steps to set up the project locally.
git clone [email protected]:OdearOgy/contact-list.git
Install node modules.
npm install
Create a db.json
file in the /public
folder and add the following content:
{
"users": [
{
"id": 1,
"name": "Jon Doe",
"phone": 1213124
}
]
}
This file will act as the database for the json-server.
Create a .env.local
file in the root of the project and set the VITE_API_URL variable. This variable will be used to define the base URL for the API.
VITE_API_URL="http://localhost:3000"
Start the json-server with the following command:
npx json-server --watch db.json --port 3000
start app by using
npm run dev
contacts
) is self-contained, including its components, queries, and styles.pages/
directory.