This folder consist of simple examples showing how to use different type-arango
features and how to integrate them with ArangoDB Foxx or any other environment.
The examples assume a TypeScript setup. It is highly recommend to start with something like arangodb-typescript-setup.
The examples have at least a folder for shared
entities across all environments and a main.ts
file or the ArangoDB Foxx Service.
Note: The examples on master branch are designed to work with latest codebase that might not be released yet. So if you are looking for examples that are compatible with the version you use, just browse the files by the git tag, e.g.
tree/v0.9.0
for0.9.0
release.
- 🥑 basic - quick setup of defining an entity, a collection and some routes
- 👥 roles - usage of
roles
to authenticateroutes
andattributes
- 📌 relations - usage of
@OneToMany
/@OneToOne
and related attributes inside routes
It is recommended to use the folling compilerOptions
when making use of the syntactic
sugar argument function syntax (for example roles => ['abc']
).
compilerOption | value |
---|---|
noImplicitAny: | false |
strictPropertyInitialization: | false |
noUnusedParameters: | false |
Arguments
can be provided without the function syntax (['abc']
instead of roles => ['abc']
).