example-react-express
example-react-express copied to clipboard
Demo
https://magic-react-express.herokuapp.com/login
Quick Start Instructions
Start server
$ git clone https://github.com/magiclabs/example-react-express.git
$ cd example-react-express
$ mv .env.example .env
$ yarn install
$ node server.js
Start client (in a new CLI tab)
$ cd client
$ mv .env.example .env
$ yarn install
$ yarn start
.env Files
There are two environment files for the application, one client-side and one server-side.
You can grab the REACT_APP_MAGIC_PUBLISHABLE_KEY (client/.env) and MAGIC_SECRET_KEY (.env) from Magic's Dashboard.
client/.env (client)
REACT_APP_MAGIC_PUBLISHABLE_KEY=pk_test_1234567890
REACT_APP_CLIENT_URL=http://localhost:3000
.env (server)
MAGIC_SECRET_KEY=sk_live_123...
CLIENT_URL=http://localhost:3000
- Note: the tutorial was built using Magic UI components. If you swap them out for your own custom CSS, you can delete
@magiclabs/uiandframer-motionfrom yourclient/package.jsondependencies.
Tutorial
https://magic.link/posts/magic-react-express