Git Product home page Git Product logo

directus-api-extensions-typescript's Introduction

Directus hook typescript example

Update: This was created before v9.0.0 of directus which changed the way extensions are registered. The code here may still work on new versions, but I'll still try to update it if I have time.

Directus is a good choice if you need to provide a simple CRUD dashboard for your project without having to build one yourself or shoehorning a CMS on top of the existing database.

Directus provides a lot of the stuff out of the box, and it can be configured through the ui and environment variables. In addition to that it can be further customized by using extensions. Currently directus doesn't support building hooks in typescript. In addition to that you have to manually restart directus server in order to see the changes you made to the exension.

This repository provides a webpack config that bundles extensions built in typescript and puts the outputs where directs would expect them to be and restarts the server after emitting the bundle. Only hooks example is available at the moment, but other extension types should be easily supported with a few tweaks to the webpack config and I might add them later.

Getting started

The easiest way to run this example is by using docker-compose. Run the following command to get the example up and running:

git clone [email protected]:AleksaC/directus-api-extensions-typescript.git
cd directus-api-extensions-typescript
cp example/.env.example example/.env
./bootstrap.sh

Contact ๐Ÿ™‹โ€โ™‚๏ธ

directus-api-extensions-typescript's People

Contributors

aleksac avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.