-
Notifications
You must be signed in to change notification settings - Fork 18
Local Development
Niraj Gautam edited this page Jul 4, 2025
·
1 revision
As Next PMS has React based frontend, follow the steps below to setup your local.
- Since Frappe's CSRF token will not be available to the React App while developing we need to ignore it, You can do it by adding
ignore_csrfin yoursite_config.json.
# sites/<site-name>/site_config.json
"ignore_csrf":1
- Add allowed CORS, so we don't get CORS error with React app.
# sites/<site-name>/site_config.json
"allow_cors": "*",
- Create
.envfrom.env.sample
VITE_BASE_URL="http://localhost"
VITE_SOCKET_PORT=5173
VITE_SITE_NAME="localhost"
VITE_ENABLE_SOCKET=true // Always keep it true as it is used
VITE_SITE_PORT=80
If you are using Frappe Manager, please create two envs, one for development and one for production
# .env.development
VITE_BASE_URL="http://<site-name>"
VITE_SOCKET_PORT=5173
VITE_SITE_NAME="<site-name>"
VITE_ENABLE_SOCKET=true // Always keep it true as it is used
VITE_SITE_PORT=80
# .env.production
VITE_BASE_URL="http://<site-name>"
VITE_SOCKET_PORT=80 // In production mode socketio listens at 80
VITE_SITE_NAME="<site-anme>"
VITE_ENABLE_SOCKET=true // Always keep it true as it is used
VITE_SITE_PORT=80
- Now run the Reat app from terminal on the host machine.
npm run dev