A scaffold with basic user authentication.
-
npm install
thencd client && yarn install
, this will install the dependencies for server and client side. -
You have to modify the mysql configuration, either by creating .env file or modify
db/index.js
directly. In this project, I just created a table with 5 columns(id, email, password, permission, gender). Currently -
npm start
in the root folder, this will run both server and client scripts. -
Head to localhost:3000, which is the default port by create-react-app
I used ant-design as UI framework. If you don't want to import all styles of antd, you have to do some extra work. react-app-reqired was and is still the recommended way by antd to achieve this. However, react-app-wired doesn't support create-react-app 2.0 anymore, see 2.0 Discussion. I go for craco, which is pretty easy to use.