mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Ok, so here is the plan. Let's give both our cucumber features and your cypress tests a prominent place to live. That would be the root level folder of our application. Second, let's revive formerly dead code step by step. Ie. move code from the former location `backend/features/` to `features/` when it is ready. All edge cases should be tested with unit tests in `backend/`, see my `webfinger.spec.js` as an example.
30 lines
678 B
JavaScript
30 lines
678 B
JavaScript
import user from './user'
|
|
import inbox from './inbox'
|
|
import express from 'express'
|
|
import cors from 'cors'
|
|
import verify from './verify'
|
|
|
|
export default function() {
|
|
const router = express.Router()
|
|
router.use(
|
|
'/activitypub/users',
|
|
cors(),
|
|
express.json({
|
|
type: ['application/activity+json', 'application/ld+json', 'application/json'],
|
|
}),
|
|
express.urlencoded({ extended: true }),
|
|
user,
|
|
)
|
|
router.use(
|
|
'/activitypub/inbox',
|
|
cors(),
|
|
express.json({
|
|
type: ['application/activity+json', 'application/ld+json', 'application/json'],
|
|
}),
|
|
express.urlencoded({ extended: true }),
|
|
verify,
|
|
inbox,
|
|
)
|
|
return router
|
|
}
|