0.0.0-dev.1 • Published 6 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
6 months ago
0.0.0-dev.21
6 months ago
0.0.0-dev.22
6 months ago
0.0.0-dev.23
6 months ago
0.0.0-dev.18
6 months ago
0.0.0-dev.19
6 months ago
0.0.0-dev.17
6 months ago
0.0.0-dev.16
7 months ago
0.0.0-dev.15
7 months ago
0.0.0-dev.13
8 months ago
0.0.0-dev.14
8 months ago
0.0.0-dev.11
8 months ago
0.0.0-dev.10
8 months ago
0.0.0-dev.5
8 months ago
0.0.0-dev.4
8 months ago
0.0.0-dev.3
9 months ago
0.0.0-dev.9
8 months ago
0.0.0-dev.8
8 months ago
0.0.0-dev.7
8 months ago
0.0.0-dev.6
8 months ago
0.0.0-dev.2
1 year ago
0.0.0-dev.1
1 year ago