GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - la3rence/node-express-example: Template Node.js Project (integration with swagger for API docs, mocha for testing, code coverage, dockerize, and ci/cd by Jenkins) Node.js 模版项目

BranchesTags
Open more actions menu

Latest commit

 

History

448 Commits
448 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
api
api
 
 
config
config
 
 
middleware
middleware
 
 
public
public
 
 
swagger
swagger
 
 
test
test
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
Dockerfile
Dockerfile
 
 
Jenkinsfile
Jenkinsfile
 
 
app.js
app.js
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
readme.md
readme.md
 
 
renovate.json
renovate.json
 
 
server.js
server.js
 
 
vercel.json
vercel.json
 
 

Repository files navigation

My Express Template

Mocha CI codecov

This is a demo app when I was learning Node.js with pure ESM support, test coverage, ci/cd, container support and swagger integration.

Start

pnpm start

This will listen the tcp port 8080 to provide the http service.

Test

pnpm test

Using mocha, chai to do the E2E testing. (Assertion library and test framework) Using c8 to do the code coverage. Try pnpm run test:coverage to see the coverage report under the coverage directory.

TIPS: Using mocha -g ${keyword} to execute the test cases with name contains ${keyword}. or pnpm run test:grep ${keyword}.

Env

Touch a file called .env to export env variables on local dev machine (by dotenv).

Swagger

This project using swagger-ui to provide the swagger UI and using swagger-autogen to generate the swagger spec json file. The default swagger ui page is /api/docs.

Serverless

The default directory for these functions is ./api.

I'm not using the way Vercel recommends, but the traditional way based on express - which makes it easier for me to deploy by any means, like using Docker or directly using node.js.

License

MIT

About

Template Node.js Project (integration with swagger for API docs, mocha for testing, code coverage, dockerize, and ci/cd by Jenkins) Node.js 模版项目

node.lawrenceli.me

Topics

best-practiceexpresshttp-serverjavascriptmochanodejsswaggertemplate-projecttemplate-repository

Resources

Readme
Activity

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.