From aa01e258948a13abafa7c441a7b82e5c2fb676b9 Mon Sep 17 00:00:00 2001 From: ilyayudovin Date: Tue, 9 Jun 2020 13:14:57 +0300 Subject: feat: create user service --- app.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app.ts') diff --git a/app.ts b/app.ts index 7607537..4a60eb8 100644 --- a/app.ts +++ b/app.ts @@ -4,6 +4,7 @@ import express from '@feathersjs/express'; import socketio from '@feathersjs/socketio'; import { PollService } from './PollService'; +import {UserService} from "./UserService"; const app = express(feathers()); @@ -15,7 +16,7 @@ app.configure(socketio()); app.use(express.errorHandler()); app.use('/polls', new PollService()); - +app.use('/users', new UserService()); // Add any new real-time connection to the `everybody` channel app.on('connection', connection => @@ -43,3 +44,12 @@ app.service('polls').create({ } } }); + +app.service('users').create({ + info: { + name: 'John Doe', + age: 20, + nationality: 'Belarus', + sex: 'male' + } +}); -- cgit v1.2.3