
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@actbase/node-server
Advanced tools
Node.js๋ฅผ ์ํ express๊ธฐ๋ฐ์ ์น ํ๋ ์์ํฌ.
const app = require('@actbase/node-server');
app.run();
@actbase/node-server๋ npm registry๋ฅผ ํตํด ์ฌ์ฉํ ์ ์๋ Node.js ๋ชจ๋ ์ ๋๋ค.
์ค์นํ๊ธฐ ์ ์ Node.js๋ฅผ ๋ค์ด๋ก๋ํ์ฌ ์ค์นํด์ฃผ์ธ์. Node.js 0.10 ์ด์์ด ํ์ํฉ๋๋ค.
๋ง์ฝ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ๋ง๋ค ๊ฒฝ์ฐ npm init์ ์ฌ์ฉํ์ฌ ํ๋ก์ ํธ๋ฅผ ์์ฑ ํฉ๋๋ค.
์ค์น๋ npm install์ ์ฌ์ฉํ์ฌ ์ค์น๋ฉ๋๋ค.
$ npm install @actbase/node-server
import { createRoute } from '@actbase/node-server';
import UserService from '../services/UserSerivce';
const execute = ({ user }) => {
return UserService.getMe(user);
};
export default createRoute(
{
method: 'GET',
uri: '/me',
},
execute,
{
tags: 'User',
description: 'Get Me',
},
);
import { createModel, TypeIs } from '@actbase/node-server';
const User = createModel(
'users',
{
username: { type: TypeIs.STRING, comment: '์์ด๋' },
password: { type: TypeIs.STRING, comment: '๋น๋ฐ๋ฒํธ' },
},
{
with: ['*'],
},
);
export default User;
import { createDto } from '@actbase/node-server';
import User from '../models/User';
export default createDto(
'UserMeDto',
{
username: { type: TypeIs.STRING, comment: '์์ด๋' },
},
{
defineModel: User,
},
);
import { createService } from '@actbase/node-server';
import User from '../models/User';
import UserMeDto from '../dtos/UserMeDto';
export default createService({
getMe: (repo, [user]) => {
const userMe = repo.findOne(User, {
exportTo: UserMeDto,
where: {
id: user.id,
},
});
if (!userMe) throw { status: 404, message: 'Not found User' };
return UserMeDto.map(userMe);
},
});
FAQs
Node Server Framework
The npm package @actbase/node-server receives a total of 0 weekly downloads. As such, @actbase/node-server popularity was classified as not popular.
We found that @actbase/node-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.ย It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.