Skip to content

API for authenticating and managing users / groups in LDAP

Notifications You must be signed in to change notification settings

wrathofrathma/ldap-api

Repository files navigation

Express Typescript Template

An opinionated project scaffold for a REST API with express / typescript.

Technologies & Features

  • [server] Express.js
  • [language] Typescript
  • [nodemon] Hot reloading development environment
  • [dotenv] .env parsing into configuration before startup
  • [custom] Global configuration files parsed before startup
  • [prisma] Database ORM & migrations
  • [custom] Sane project structure with middleware, controllers, routes, configuration, exceptions, services, etc.
  • [japa] Unit testing with japa, supertest, and jest expectations.

Project Structure

This project structure is inspired by an older version of Adonis.js. It seemed sane, scalable, and simple.

  • app/ - All of the application logic.
    • exceptions/ - Exceptions & Exception handlers
    • http/
      • controllers/ - Route controllers / logic.
      • middleware/ - All HTTP middleware.
    • routes/ - Collection of routers/routes.
    • services/ - Business logic / where the 'how' is implemented.
  • bin/ - Japa unit test runner
  • config/ - Dedicated, importable configuration files.
  • prisma/ - Anything to do with prisma database schemas / migrations.
  • tests/ - Unit tests
  • app.ts - Entry point to the application
  • server.ts - Starts the server / event loop.
  • .env - Environmental variables loaded by DotEnv.

Resource links

Here are some key resource links that I found useful

Express

Typescript

Prisma

Unit Testing

About

API for authenticating and managing users / groups in LDAP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published