|
| 1 | +# Gen3 Express |
| 2 | +A gen3 tool to generate get started express app. |
| 3 | + |
| 4 | +## Acknowledgements |
| 5 | +You need to know atleast basics about these things. |
| 6 | + - [NodeJS](https://nodejs.org/docs/latest/api/) |
| 7 | + - [ExpressJS](https://expressjs.com/en/5x/api.html) |
| 8 | + - [Embedded JS](https://ejs.co/) |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- Minimal and Useful 💫 |
| 13 | +- JS Hot Reloadings 🚀 |
| 14 | +- EJS and Static Hot Reloadings 📜 |
| 15 | +- Cross Platform ⚔ |
| 16 | +- NPX (no need to install extra stuff) 🥙 |
| 17 | +## Installation |
| 18 | +You can install and generate an express app using this tool in two approaches. Here I'm generating an app with name `my-app`, you can name to it anything you like. |
| 19 | + |
| 20 | +### 1. node package extecutor |
| 21 | +This method is highly recommended to generate an express app. |
| 22 | +```bash |
| 23 | +npx https://www.github.com/OurCodeBase/gen3-express my-app |
| 24 | +``` |
| 25 | + |
| 26 | + |
| 27 | +### 2. node package manager |
| 28 | +Generation of an express app is not recommended through npm. |
| 29 | +```bash |
| 30 | +npm install -gen3 https://www.github.com/OurCodeBase/gen3-express.git |
| 31 | +``` |
| 32 | +```bash |
| 33 | +gen3-express my-app |
| 34 | +``` |
| 35 | + |
| 36 | +## Documentation |
| 37 | +To install all dev dependencies goto the folder and hit `npm install` command. |
| 38 | +```bash |
| 39 | +cd my-app |
| 40 | +npm install |
| 41 | +``` |
| 42 | +To start a dev server to preview page use `server` word. |
| 43 | +> [!NOTE] |
| 44 | +> This does not include EJS and static files live (hot) reloading. |
| 45 | +```bash |
| 46 | +npm run server |
| 47 | +``` |
| 48 | +To start a dev server to live preview EJS page use `sync` word. |
| 49 | +```bash |
| 50 | +npm run sync |
| 51 | +``` |
| 52 | +If you want to run all these servers together then you should to use this below command, this command will provide you hot reloadings in every place. |
| 53 | +```bash |
| 54 | +npm run server & npm run server |
| 55 | +``` |
| 56 | + |
| 57 | +## File Cases |
| 58 | +To know about the product or project structure read about files included in this code block. |
| 59 | + |
| 60 | +```bash |
| 61 | +. |
| 62 | +├── app.js # this core file handles express functions and server. |
| 63 | +├── nets.js # this file provides functions to display available ip addresses on your network. |
| 64 | +├── package.json # package file handles dependencies, and details about the product. |
| 65 | +├── public # this folder contains public data like fonts, css and multimedia. |
| 66 | +│ ├── fonts |
| 67 | +│ │ └── sans.woff |
| 68 | +│ └── style.css |
| 69 | +├── sync.js # this file is needed to configure hot reloadings in ejs and static files. |
| 70 | +└── views # this folder contains ejs or html files to render contents. |
| 71 | + └── home.ejs # this file is the landing page of the product. |
| 72 | +``` |
| 73 | + |
| 74 | +## Milestone |
| 75 | + |
| 76 | +- Custom name in `package.json` file |
| 77 | +- Excellent terminal user interface |
| 78 | +- Prompt `package.json` file's details from user. |
| 79 | +- Post this project to npmjs website. |
| 80 | + |
| 81 | +## Authors |
| 82 | +- [@OurCodeBase](https://www.github.com/OurCodeBase) |
| 83 | + |
| 84 | +## Contributing |
| 85 | +Contributions are always welcome! |
0 commit comments