https://github.com/sql-js/react-sqljs-demo
A demonstration showing how to use sql.js with create-react-app
https://github.com/sql-js/react-sqljs-demo
create-react-app react sql sqlite sqljs webpack
Last synced: 3 days ago
JSON representation
A demonstration showing how to use sql.js with create-react-app
- Host: GitHub
- URL: https://github.com/sql-js/react-sqljs-demo
- Owner: sql-js
- License: mit
- Created: 2020-03-11T15:39:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T11:24:38.000Z (over 1 year ago)
- Last Synced: 2025-05-30T11:53:15.848Z (29 days ago)
- Topics: create-react-app, react, sql, sqlite, sqljs, webpack
- Language: JavaScript
- Homepage: https://react-sqljs-demo.ophir.dev/
- Size: 2.85 MB
- Stars: 114
- Watchers: 5
- Forks: 33
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# demonstration of [react](https://reactjs.org/) + [sql.js](https://github.com/sql-js/sql.js)
This is a template repository demonstrating the use of sql.js with create-react-app.
The only differences with a traditional create-react-app application are :
- The usage of [craco](https://github.com/gsoft-inc/craco) to allow providing a custom [webpack](https://webpack.js.org/) configuration
- a small custom webpack configuration in [`craco.config.js`](./craco.config.js) to copy the wasm module from sql.js to the distributed assetsNote that you should make sure your server serves `.wasm` files with the right mimetype, that is: `application/wasm`. Otherwise, you'll see the following error: `TypeError: Response has unsupported MIME type`
See [`src/App.js`](./src/App.js) for the code.
### [view the live demo](https://react-sqljs-demo.ophir.dev/)