When trying to initialise a new project for mongoose/express I get the following error:
const forest = require(‘forest-express-mongoose’);
const models = require(’./controllers/users’);
const connection = require(’./models/mongooseDatabase’);
app.use(await forest.init({
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
objectMapping: models,
connections: { default: connection },
}));
app.use(await forest.init({
^^^^^
SyntaxError: missing ) after argument list
I have express 4.17 and mongoose 5.12
Expected behavior
I would expect the initialisation process to work as described in the documentation
Actual behavior
Getting the following error:
app.use(await forest.init({
^^^^^
SyntaxError: missing ) after argument list
Failure Logs
Please include any relevant log snippets, if necessary.
Context
Please provide any relevant information about your setup.
- Package Version:
- Express Version:
- Sequelize Version:
- Database Dialect:
- Database Version:
- Project Name: