javascript - Migrating react project dependencies from node to apache -
i have created react application using create-react-app want move application node apache , i'm not sure how handle project's dependencies. instance, material-ui's documentation lists npm on installation guide.
is there way these dependencies work on apache server?
if so, separate configuration process each dependency?
package.json { "name": "app", "version": "0.1.0", "private": true, "dependencies": { "material-ui": "^0.18.6", "npm": "^5.1.0", "prop-types": "^15.5.10", "react": "^15.6.1", "react-dom": "^15.6.1", "react-flexbox-grid": "^1.1.3", "react-router": "^4.1.1", "react-router-dom": "^4.1.1", "react-tap-event-plugin": "^2.0.1" }, "devdependencies": { "babel-preset-env": "^1.6.0", "eslint": "^3.19.0", "eslint-config-airbnb": "^15.0.1", "eslint-plugin-import": "^2.7.0", "eslint-plugin-jsx-a11y": "^5.1.0", "eslint-plugin-react": "^7.1.0", "react-scripts": "1.0.10" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }
react applications don't depend on particular server technology - once build has run, it's static javascript.
running npm run build in project's root create dist folder bundled application inside - need deploy contents of folder apache server.
see 'deploying' section of create-react-app readme more info.
as aside - if you've been using create-react-app's built-in server in production, don't! that's designed development, , not performant nor secure enough serving app world.
Comments
Post a Comment