
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
typescript_base_rest_api
Advanced tools
[](https://coveralls.io/github/Artear/typescript-base-rest-api-dynamodb-module?branch=master) [: void {
this.get("/items", ItemService.getItems);
this.get("/items/:id", ItemService.findById);
}
}
export default class ItemService extends BaseService {
static controller: ItemController = new ItemController();
@RestifyValidation.isAlphanumeric("id")
public static findById(req: Request, res: Response, next: Next): void {
// do stuff
}
public static getItems(req: Request, res: Response, next: Next): void {
// do other stuff
}
let options: ServerOptions = new OptionsBuilder()
.withName(config.get<string>("server.options.name"))
.withVersion(config.get<string>("server.options.version"))
.build();
export let server: Server = new ServerBuilder()
.withTimeout(config.get<number>("server.options.timeout"))
.withOptions(options)
.withQueryParser(queryParser())
.withRouter(new PingRouter())
.withRouter(new ItemRouter())
.withCORS(false)
.build();
let port = config.get<number>("port");
server.listen(port, function () {
loggerHelper.info("App online on port: " + port);
});
The API will be running at http://localhost:8282
You can configure your application using environment variables. Example:
{
"port": "PORT",
"security": {
"enable": "SECURITY_ENABLE",
"token": "SECURITY_TOKEN"
},
"newrelic": {
"enable": "NEWRELIC_ENABLE",
"license_key": "NEWRELIC_LICENSE_KEY",
"app_name": "NEWRELIC_APP_NAME"
}
}
Check examples folder to see some basic usage.
To use lint in development, you need to install typescript and tslist globally:
npm install -g typescript tslint
FAQs
[](https://coveralls.io/github/Artear/typescript-base-rest-api-dynamodb-module?branch=master) [![CircleCI](https://circleci.com/gh
The npm package typescript_base_rest_api receives a total of 18 weekly downloads. As such, typescript_base_rest_api popularity was classified as not popular.
We found that typescript_base_rest_api 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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.