ACE with Fastify (not express)

Hello,

Is it possible to run ACE on Fastify framework, not express?

I’m getting this error: “Error: Missing handler function for GET:env route.” when i try to “const addon = ace(app);”

Thanks in advance for any help,
Bartek

… when i try to “const addon = ace(app);”

You have noted that ACE (Bitbucket) itself doesn’t create Express app.

The app is created by your project, and passed to ACE like this:
https://bitbucket.org/atlassian/atlassian-connect-express-template/src/master/app.js

// Bootstrap Express and atlassian-connect-express
const app = express();
const addon = ace(app);

So conceptually as long as app is compatible with the app that ACE expects, your project should work.

About the specific error you mentioned, I think it’s because in ACE source code, env variable is set and taken out like this:

app.set("env", "development");
if (app.get("env") === "development") ...

You can try replacing app.get("env") with app.settings["env"]:

If it works, please create a pull request to ACE:
https://bitbucket.org/atlassian/atlassian-connect-express/pull-requests/

Thanks in advance.