Repository navigation
commonjs - Node Express Final Version
v1.0.0 – Initial Release
First release of the Node.js Express EJS Tailwind CSS Starter, a starter template for building modern web applications with Express, EJS, and Tailwind CSS. This version uses CommonJS (require / module.exports).
Features
- Express.js server setup with the latest Express version
- EJS templating for dynamic pages
- Tailwind CSS integration through
@tailwindcss/cli - Organized project structure with
routes/,views/, andpublic/ - Built-in middleware for JSON and URL-encoded request parsing, cookies, and request logging
- Error handling with a 404 handler and a custom
error.ejspage - Development workflow with Nodemon and Tailwind CSS watch mode
- Production-ready, minified CSS build
- Prettier setup with the Tailwind CSS class-sorting plugin
Included Scripts
| Command | Description |
|---|---|
npm start |
Start the application |
npm run dev |
Run the server with Nodemon and Tailwind CSS watch mode |
npm run dev:server |
Run only the development server |
npm run devcss |
Compile Tailwind CSS and watch for changes |
npm run buildcss |
Build and minify Tailwind CSS for production |
Project Structure
├── bin/www
├── public/
│ ├── images/
│ ├── javascripts/
│ └── stylesheets/tailwind.css
├── routes/
│ ├── index.js
│ └── users.js
├── views/
│ ├── index.ejs
│ └── error.ejs
├── app.js
└── package.json
Getting Started
git clone https://github.com/mraxays/node-express-ejs-tailwindcss-starter.git
cd node-express-ejs-tailwindcss-starter
npm install
npm startThe server runs at http://localhost:3000/.
Dependencies
Express, EJS, Tailwind CSS (@tailwindcss/cli), Morgan, Cookie Parser, Debug, HTTP Errors
Dev dependencies: Nodemon, Prettier, Prettier Plugin Tailwind CSS
License
Released under the MIT License.