Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenIntra 🚀🏗
# OpenIntra 🚀🏗

The OpenIntra is an Open Source Intranet System tailored for enterprises.
The OpenIntra is an Open Source Intranet System tailored for enterprises.

This frontend is powered by React⚡ and it was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Expand Down Expand Up @@ -31,12 +31,15 @@ Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`
### `npm run json-server` (new)

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
Run JSON server as prototype backend. Since our backend under development please use JSON-server as the prototyping backend. following are the steps you g through to spin up the JSON server.

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
- install JSON server globally by using the following command.
`$ npm install -g json-server`

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
- CD into project directory.
`$ cd open-intra`

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
- run following command.
`$ npm run json-server`
34 changes: 34 additions & 0 deletions data/db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"employees": [
{
"userId": 1,
"jobTitleName": "Developer",
"firstName": "Jhon",
"lastName": "Doe",
"employeeCode": "E1",
"department": "SE",
"phoneNumber": "408-1234567",
"emailAddress": "[email protected]"
},
{
"userId": 2,
"jobTitleName": "Tester",
"firstName": "Alan",
"lastName": "Irani",
"employeeCode": "E1",
"department": "QA",
"phoneNumber": "408-1234567",
"emailAddress": "[email protected]"
},
{
"userId": 3,
"jobTitleName": "Developer",
"firstName": "Steve",
"lastName": "Smith",
"employeeCode": "E1",
"department": "SE",
"phoneNumber": "408-1234567",
"emailAddress": "[email protected]"
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"scripts": {
"start": "react-scripts start",
"json-server": "json-server --watch data/db.json --port 3001",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand All @@ -34,4 +35,4 @@
"last 1 safari version"
]
}
}
}