An example of importing excel data to a database, with Express.js & MySQL.
- NPM or Yarn as package manager.
- Node.js installed on the local machine.
- MySQL intalled on the local machine (ex. XAMPP)
- Clone this repository:
git clone https://github.com/rifanid98/batch-insert-on-duplicate-update-example
- Start XAMPP
- Database configuration:
- Open http://localhost/phpmyadmin in the browser
- Import database, select
mahasiswa.sql
file from project folder
- Start the server:
- Open root project folder with command line (terminal, linux. cmd, windows. etc.)
- Type and run this command
npm start
to start the server. - Make sure there are no other processes that use port 3000
- Run app with api testing tools like postman, etc. on http://localhost:3000/mahasiswa/api/v1/ or using local ip like http://192.168.43.88:3000/mahasiswa/api/v1/ as an example.
- Don't forget to change .env variable value to your own config.
- CRUD & Import data from excel file.
- CORS allowed
See the demo here
- Node.js - JavaScript runtime environment
- Express.js - Node.js framework
- MySQL Database
This project is licensed under the MIT License - see the LICENSE file for details