donejs / donejs/done-serve

Add a middleware

Open
#35 4 comments 1 reaction 0 assignees View on GitHub
enhancement p4
Dominant language
JavaScript
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I don't know if this is a common issue, but right now I needed to start a DoneJS app, and I need to add **one little middleware** to the project. (in this case an custom-auth middleware)

So, currently, to make that work, and still enjoy the benefits of the live-reloading, server-rendering, SPA'ing `done-serve` stuff, I basically had to copy-pasta all the `done-serve` code into a `server.js` file, and run that instead. Not horrible, but I feel it would be a lot _cooler_ if I could just set some config or something `donejs add middleware my-middleware` and have it work out for me.

I know it doesn't have this right now but...

![sure-would](https://user-images.githubusercontent.com/76821/26952957-f9c75a04-4c64-11e7-85ba-be1cb0d25b36.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the existing done-serve behavior with the server.js copy-pasta setup described in the issue. Define how a custom-auth middleware would be configured or added while preserving live reloading, server rendering, and SPA support; done is a documented, working extension path rather than a separate copied server.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.