Skip to content
Merged
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client/**
35 changes: 35 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"env": {
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2018
},
"extends": "airbnb-base",
"overrides": [
{
"files": [
"*.js"
],
"rules": {
"no-console": "off"
}
},
{
"files": [
"*.spec.js"
],
"rules": {
"max-lines": [
"error",
1500
],
"max-lines-per-function": [
"error",
1500
]
}
}
]
}
5 changes: 5 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Contributing guidelines

- If you find a relevant issue that you can actively work on, mention it and start hacking away
- Fork the repo and raise a PR that respects the [template](.github/pull_request_template.md)
- Make sure you maintain a respectful decorum in comments and code
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--- Provide a general summary of your changes in the Title above -->

### Description
<!--- Describe your changes in detail -->

### Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

### How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

### Screenshots, if any

### Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

### Scope of the changes
- [ ] User Interface
- [ ] APIs

### Other checks

- [ ] My code follows the coding style of this project
- [ ] I added unit tests that covers my code
- [ ] I made sure there are no linter errors
57 changes: 45 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,72 @@

> Manage your node projects from user interface

### RATIONALE
## RATIONALE

* **No**de **P**roject **M**anager sounded very close to **Nopalm**(also sounding similar to `Napalm` :)). Hence the name!
* I always faced difficulties in searching a relevant package while working on a node project and heavily craved for an UI since coming back and forth between browser and terminal killed productivity
* To solve this, I thought of developing a <span style="color:#12344d; font-weight: bold">Nopalm (Node Project Manager)</span> with an exciting web user interface to search, install and uninstall packages from a single place
* To solve this, I thought of developing <span style="color:#12344d; font-weight: bold">Nopalm (Node Project Manager)</span> with an exciting web user interface to search, install and uninstall packages from a single place
* You can also scaffold a **new node project**
* This project is heavily inspired from [Vue-UI](https://cli.vuejs.org/dev-guide/ui-api.html)

### USAGE
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app)

## USAGE

* Install the npm package globally and run the local server inside any node project directory / empty directory
```shell
npm i -g nopalm
cd /path/to/target_dir && nopalm
```
* Visit [http://localhost:8001](http://localhost:8001) to start managing your node project

### To test locally
##### Pre installed requirements
## To run locally

#### Pre installed requirements
- **node > 10**
- **npm** or **yarn**
##### Steps
#### Steps
* Clone the repository
* Go to the **`client/`** folder and create **`.env.development.local`** and copy the following content
* Install packages in `client` and `server`
```shell
npm i

cd client/
npm i
```
**To run the development version**
* Add this **.env** file in the `/client` folder
```shell
REACT_APP_API_BASE_URL='http://localhost:8001'
echo "REACT_APP_API_BASE_URL='http://localhost:8001'" >> .env.development.local`
```
* Run the react client
```shell
cd client
npm i
npm run start
* To run in an existing node project, go to the that particular directory and run this command
* Run the server in an existing node project
```shell
cd /path/to/target_node_project
npm run dev --prefix /path/to/nopalm
```
* Run the same command in an empty directory to create new node project !
* Visit [http://localhost:3000](http://localhost:3000) to run this in development mode
* Visit [https://localhost:3000](https://localhost:3000)
**To run the production version**
* Build the UI and run the server alone
```shell
cd client/

<!-- Build the React client -->
npm run build

<!-- cd to target node project -->
cd /path/to/target_node_project

npm run start --prefix /path/to/nopalm
```
* Visit [https://localhost:8001](https://localhost:8001)
* Follow the same steps for testing in `empty directory`

## Testing APIs

Once you run the node server you might find [this](lib/collection/README.md) interesting to test it using Postman

## [Contributing Guidelines](.github/CONTRIBUTING.md)
31 changes: 31 additions & 0 deletions client/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"root": true,
"env": {
"browser": true,
"es2020": true
},
"extends": [
"plugin:react/recommended",
"standard"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"react"
],
"settings": {
"react": {
"version": "detect"
}
},
"parser": "babel-eslint",
"rules": {
"semi": [2, "always"],
"react/prop-types": [0, "never"]
}
}
Loading