Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@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
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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.