https://magic-react-express.herokuapp.com/login
$ git clone https://github.com/magiclabs/example-react-express.git
$ cd example-react-express
$ mv .env.example .env
$ yarn install
$ node server.js
$ cd client
$ mv .env.example .env
$ yarn install
$ yarn start
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.
REACT_APP_MAGIC_PUBLISHABLE_KEY=pk_test_1234567890
REACT_APP_CLIENT_URL=http://localhost:3000
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/ui
andframer-motion
from yourclient/package.json
dependencies.