Files
freeCodeCamp/server/boot/a-services.js

18 lines
521 B
JavaScript
Raw Normal View History

import Fetchr from 'fetchr';
import getUserServices from '../services/user';
import getMapUiServices from '../services/mapUi';
import getChallengesForBlockService from '../services/challenge';
export default function bootServices(app) {
2015-07-25 15:42:03 -07:00
const challenge = getChallengesForBlockService(app);
const mapUi = getMapUiServices(app);
const user = getUserServices(app);
Fetchr.registerFetcher(challenge);
Fetchr.registerFetcher(mapUi);
Fetchr.registerFetcher(user);
app.use('/services', Fetchr.middleware());
}