mirror of https://gitee.com/bigwinds/arangodb
24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
!CHAPTER Dependency management
|
|
|
|
There are two things commonly called "dependencies" in Foxx:
|
|
|
|
* Module dependencies, i.e. dependencies on external JavaScript modules (e.g. from the public npm registry)
|
|
|
|
* Foxx dependencies, i.e. dependencies between Foxx services
|
|
|
|
Let's look at them in more detail:
|
|
|
|
!SECTION Module dependencies
|
|
|
|
You can use the `node_modules` folder to bundle third-party Foxx-compatible npm and Node.js modules with your Foxx service. Typically this is achieved by adding a `package.json` file to your project specifying npm dependencies using the `dependencies` attribute and installing them with the npm command-line tool.
|
|
|
|
Make sure to include the actual `node_modules` folder in your Foxx service bundle as ArangoDB will not do anything special to install these dependencies. Also keep in mind that bundling extraneous modules like development dependencies may bloat the file size of your Foxx service bundle.
|
|
|
|
!SUBSECTION Compatibility caveats
|
|
|
|
TODO Note about async etc
|
|
|
|
!SECTION Foxx dependencies
|
|
|
|
TODO
|