CLI scaffolding tool that generates Express, Mongoose and EJS project structures from a single terminal command.
Clone the repository and install globally:
git clone https://github.com/TarekM-7/tforge.git
cd tforge
npm install
npm install -g .tforge <project-name>tforge my-appYou will be prompted to choose whether to install dependencies and initialize a Git repository automatically.
my-app/
├── views/
│ ├── boilerplate/
│ │ └── boilerplate.ejs
│ └── index.ejs
├── public/
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── app.js
├── models/
├── routes/
├── seeds/
├── utils/
├── .gitignore
├── index.js
└── package.json
The generated project comes with:
- Express server wired up and ready to run
- Mongoose connected to a local MongoDB database named after your project
- EJS with ejsMate for layout support
- method-override for PUT and DELETE requests
- A base boilerplate layout in
views/boilerplate/ - Static files served from
public/ - A starter route at
/ - A 404 catch-all handler
tforge --help Display help information
tforge -h Display help information
cd my-app
npm startMake sure MongoDB is running locally before starting the server.