👋 Welcome to express-skeleton, part of the Project Calavera. Express-skeleton is a starter template(skeleton) for Expressjs based apps and websites.
This repository allows you to quickly scaffold a basic Expressjs project using the Pug templating language. It provides the following:
Once cloned, either directly, or a repository that uses this one as a template repository, it allows you to simply run npm i
or yarn
to install the dependencies you will need.
"devDependencies": {
"nodemon": "^2.0.16",
"parcel-bundler": "^1.12.5"
},
"dependencies": {
"express": "^4.18.1",
"pug": "^3.0.2"
}
The pckage.json
that comes with the project also has the following NPM script targets:
"build": "parcel views/index.pug",
"start": "nodemon app.js",
NOTE: Remember to update the
package.json
with information about your project.
It also contains a basic .gitignore
file as well as a default configuration(.prettierrc
) for Prettier.
It contains a single route
that will serve your index file.
The project also contains an empty main.js
file, which is already being included for you inside the footer partial. There is also a head.pug file that contains basic elements that goes into the head
of your HTML document. This then also loads the CSS file from the static folder.
The project also includes a .github
folder with the following:
- dependabot.yml - Setup to automatically keep the project dependencies up to date.
- workflows/auto-merge.yml - This will automatically merge Dependabot pull request that are not a major version bump and, should all your CI tests and workflows pass. To use this, you will also need to configure a repository environmental secret with a personal access token that has repo scope.
- workflows/codeql-analysis.yml - Uses the GitHub CodeQL workflow to nspect source code for possible security issues.
If you often start new projects that uses Expressjs, Pug and the Parcel bundler this will definitely save you at least an hour of your day. That is nothing to sneeze at right? 😁
- Once you have your repository ready, clone it locally
- Change into the root directory for the cloned repository
- Run
yarn
ornpm i
- Run
yarn start
ornpm start
- Open your browser to
http://localhost:3000
express-skeleton.mp4
If anything is not working as expected, please join our Discord server or open an issue here on GitHub.
The is project is licensed under an MIT license. If you wish to participate with this project, please read our code of conduct to ensure we foster a healthy and welcoming community.