A CRUD application that is designed to add, delete, edit and retrieve employee records using a fake REST API JSON-server. AJAX calls are all made using JavaScript's built in fetch API, with ES8 async/await syntax. The application also includes form validation using Regex. For more information on regular expressions, I recommend MDN web docs.
Ensure Node.js is installed, as it is required to install & run the application's dependencies.
- Clone the repository
$ git clone https://github.com/fiosman/employeedb-jsonserver.git
- Install the required dependencies in the project's root folder
$ npm install
- Run webpack-dev-server
$ npm run start
- Start json-server
$ npm run json:server
. You can access employee records and see changes onhttp://localhost:3000/employees
. Each record is an object inside an array.- Example record:
[ { "name": "John Doe", "age": "33", "position": "Teacher", "salary": "$71000", "id": 1, } ]
- Example record:
- CSS3/Boostrap 4/Bootswatch
- HTML5
- JSON-Server
- Modular JavaScript
- Webpack (assets bundler) & Babel (to transpile ES6+ code down to ES5). Note Babel polyfills were also used to provide browser support for modern syntax such as Async/Await.
- AJAX
Fares Osman ([email protected])
Licensed under the MIT License