Random API response using faker and custom field.
- Generate sample user and article data
- Random data count (max 1000) or specify data count
- Custom data field with custom data count
This project is used by Intelligent Proxy Server for generating normal network traffic scenario.
Server: NodeJS, Express, morgan, cors, slugify, @faker-js/faker
Clone the project
Go to the project directory
Install dependencies
npm install
Start the server
npm run start
or for development start nodemon
npm run dev
GET /api/user
GET /api/user/${count}
Parameter | Type | Description |
---|---|---|
count |
int |
Required. count of data that will generated |
GET /api/article
GET /api/article/constant
GET /api/article/${count}
Parameter | Type | Description |
---|---|---|
count |
int |
Required. count of data that will generated |
POST /api/random
Parameter | Type | Description |
---|---|---|
field |
string |
Required. separated with "," e.g. "id,name" |
count |
int |
Required. count of data that will generated |
GET /api/random/${field}
Parameter | Type | Description |
---|---|---|
field |
string |
Required. separated with "," e.g. "id,name" |