diff options
author | ilyayudovin <ilyayudovin123.@mail.com> | 2020-06-09 13:14:57 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123.@mail.com> | 2020-06-09 13:14:57 +0300 |
commit | aa01e258948a13abafa7c441a7b82e5c2fb676b9 (patch) | |
tree | b12c66b01786823671118be8f660c9fb1562abf4 /app.ts | |
parent | 977992eb70a0ca3b702e116b628d37ac75e667d1 (diff) | |
download | which-api-aa01e258948a13abafa7c441a7b82e5c2fb676b9.tar.gz |
feat: create user service
Diffstat (limited to 'app.ts')
-rw-r--r-- | app.ts | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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' + } +}); |