|
6 | 6 |
|
7 | 7 | > Manage your node projects from user interface |
8 | 8 |
|
9 | | -### RATIONALE |
| 9 | +## RATIONALE |
| 10 | + |
10 | 11 | * **No**de **P**roject **M**anager sounded very close to **Nopalm**(also sounding similar to `Napalm` :)). Hence the name! |
11 | 12 | * 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 |
12 | | -* 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 |
| 13 | +* 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 |
13 | 14 | * You can also scaffold a **new node project** |
14 | 15 | * This project is heavily inspired from [Vue-UI](https://cli.vuejs.org/dev-guide/ui-api.html) |
15 | 16 |
|
16 | | -### USAGE |
| 17 | +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) |
| 18 | + |
| 19 | +## USAGE |
| 20 | + |
17 | 21 | * Install the npm package globally and run the local server inside any node project directory / empty directory |
18 | 22 | ```shell |
19 | 23 | npm i -g nopalm |
20 | 24 | cd /path/to/target_dir && nopalm |
21 | 25 | ``` |
22 | 26 | * Visit [http://localhost:8001](http://localhost:8001) to start managing your node project |
23 | 27 |
|
24 | | -### To test locally |
25 | | -##### Pre installed requirements |
| 28 | +## To run locally |
| 29 | + |
| 30 | +#### Pre installed requirements |
26 | 31 | - **node > 10** |
27 | 32 | - **npm** or **yarn** |
28 | | -##### Steps |
| 33 | +#### Steps |
29 | 34 | * Clone the repository |
30 | | -* Go to the **`client/`** folder and create **`.env.development.local`** and copy the following content |
| 35 | +* Install packages in `client` and `server` |
| 36 | + ```shell |
| 37 | + npm i |
| 38 | + |
| 39 | + cd client/ |
| 40 | + npm i |
| 41 | + ``` |
| 42 | +**To run the development version** |
| 43 | +* Add this **.env** file in the `/client` folder |
31 | 44 | ```shell |
32 | | - REACT_APP_API_BASE_URL='http://localhost:8001' |
| 45 | + echo "REACT_APP_API_BASE_URL='http://localhost:8001'" >> .env.development.local` |
33 | 46 | ``` |
34 | 47 | * Run the react client |
35 | 48 | ```shell |
36 | 49 | cd client |
37 | | - npm i |
38 | 50 | npm run start |
39 | | -* To run in an existing node project, go to the that particular directory and run this command |
| 51 | +* Run the server in an existing node project |
40 | 52 | ```shell |
| 53 | + cd /path/to/target_node_project |
41 | 54 | npm run dev --prefix /path/to/nopalm |
42 | 55 | ``` |
43 | | -* Run the same command in an empty directory to create new node project ! |
44 | | -* Visit [http://localhost:3000](http://localhost:3000) to run this in development mode |
| 56 | +* Visit [https://localhost:3000](https://localhost:3000) |
| 57 | + **To run the production version** |
| 58 | +* Build the UI and run the server alone |
| 59 | + ```shell |
| 60 | + cd client/ |
| 61 | +
|
| 62 | + <!-- Build the React client --> |
| 63 | + npm run build |
| 64 | +
|
| 65 | + <!-- cd to target node project --> |
| 66 | + cd /path/to/target_node_project |
| 67 | + |
| 68 | + npm run start --prefix /path/to/nopalm |
| 69 | + ``` |
| 70 | +* Visit [https://localhost:8001](https://localhost:8001) |
| 71 | +* Follow the same steps for testing in `empty directory` |
| 72 | + |
| 73 | +## Testing APIs |
| 74 | + |
| 75 | +Once you run the node server you might find [this](lib/collection/README.md) interesting to test it using Postman |
| 76 | + |
| 77 | +## [Contributing Guidelines](.github/CONTRIBUTING.md) |
0 commit comments