0.0.0-dev.1 • Published 7 months ago
apeframework v0.0.0-dev.1
Ape Framework
Node.js API framework.
NPM package: apeframework
GitHub repository: ApeCommerce/ape-framework
Installation
npm install apeframework
Hello Ape!
Let's make an API serving a /hello
endpoint, in TypeScript.
Create a boot.ts
file at the root of the project:
import type { Boot, Bundle } from 'apeframework/app';
const welcome: Bundle = {
bundleId: 'welcome',
name: 'Welcome',
routes: async () => [
{
endpoint: {
method: 'GET',
path: '/hello',
},
handler: async (request, reply) => reply.send('Hello Ape!'),
},
],
};
const boot: Boot = {
bundles: async () => [welcome],
};
export default boot;
Start the API using Ape Framework's CLI:
npx ape-cli-ts api start
Request the API:
curl http://localhost:3000/hello
0.0.0-dev.20
7 months ago
0.0.0-dev.21
7 months ago
0.0.0-dev.22
7 months ago
0.0.0-dev.23
7 months ago
0.0.0-dev.18
7 months ago
0.0.0-dev.19
7 months ago
0.0.0-dev.17
8 months ago
0.0.0-dev.16
8 months ago
0.0.0-dev.15
9 months ago
0.0.0-dev.13
9 months ago
0.0.0-dev.14
9 months ago
0.0.0-dev.11
9 months ago
0.0.0-dev.10
9 months ago
0.0.0-dev.5
10 months ago
0.0.0-dev.4
10 months ago
0.0.0-dev.3
10 months ago
0.0.0-dev.9
9 months ago
0.0.0-dev.8
9 months ago
0.0.0-dev.7
10 months ago
0.0.0-dev.6
10 months ago
0.0.0-dev.2
2 years ago
0.0.0-dev.1
2 years ago