- Go to the project folder and run: npm install
- Change the database connection string in index.js according to your mysql credentials
- Create employee table with fields id, name, designation, about_employee, created_at, updated_at, salary
- Run: npm start
- open the api in localhost:3000/employee
- Use the select queries:
- localhost:3000/employee?name=Romit which is equivalent to "Select * from employee where name='Romit'"
- localhost:3000/employee?name[like]=%a% which is equivalent to "Select * from employee where name like '%a%'"
- localhost:3000/employee?name[like]=%a%&sort[desc]=name which is equivalent to "Select * from employee where name like '%a%' order by name desc"
- localhost:3000/employee?start=1&offset=10 which is equivalent to "Select * from employee limit 1,10"
- Custom query builder is on the branch custom-query-builder