This provides instructions for setting up and using the Strapi API locally for the Frontend Assessment. This API includes the /user-informations
endpoint for managing user data.
- Node.js (Refer to Node.js website for installation)
- npm (Usually comes with Node.js installation)
- Strapi (This project requires Strapi to be installed globally)
- Clone the repository:
git clone https://github.com/DigiFly-Development/Frontend-Assessment-Backend.git
- Navigate to the project directory:
cd Frontend-Assessment-Backend
- Install Strapi globally (if not already installed):
npm install strapi -g
- Install project dependencies:
npm install
- Start the Strapi server in development mode:
strapi start
Important Note: If you face an issue while using npm install
and receive a network error, you might need to delete the existing node_modules
folder and rerun the npm install
command.
Retrieves a list of user information entries from the database.
Usage:
GET http://localhost:1337/user-informations
Submits new user information to the database.
Request Body Format:
{
"FirstName": "Test",
"LastName": "Name",
"Email": "testmail@email.com",
"Phone": "501105191001"
}
Usage:
POST http://localhost:1337/user-informations
You can test the API using tools like Postman by making HTTP requests to the specified endpoints.