ForestAdmin / forest-express-mongoose

🌱 ExpressJS/Mongoose agent for Forest Admin to integrate directly to your existing ExpressJS/Mongoose backend application.
https://www.forestadmin.com
GNU General Public License v3.0
193 stars 28 forks source link

Is this still supported? #287

Closed jhackett1 closed 4 years ago

jhackett1 commented 4 years ago

I had version 3.2.4 of this installed in a production app.

I have upgraded to a ~5 version and now I can't connect to my staging and local dev sites—it complains about a CORS issue.

I can't find any documentation for installing with this package any more, nor anything about migrating from this package to lumber. What's the best way forward here?

I'm using one smart field, which looks like:

const Liana = require('forest-express-mongoose')

Liana.collection('Service', {
    fields: [{
        field: 'longlat',
        type: 'String',
        get: (service) => {
            return service.geo.coordinates.join(",")
        },
        set: (service, longlat) => {
            let coordinates = longlat.replace(/\s/g, '').split(",")
            service.geo = {
                type: "Point",
                coordinates: [parseFloat(coordinates[0]), parseFloat(coordinates[1])]
            }
            return service
        }
    }]
})

...everything else is as out of the box.

rap2hpoutre commented 4 years ago

Hi @jhackett1 and @nadinejerome. Thank you for your feedback.

I would suggest updating this package for your version one major version by one and check at each step if it still works. You would have to follow the update guides, assuming you are still in version 3 right now:

  1. https://docs.forestadmin.com/documentation/v/v4/how-tos/upgrade-to-v4
  2. https://docs.forestadmin.com/documentation/v/v5/how-tos/maintain/upgrade-to-v5
  3. https://docs.forestadmin.com/documentation/how-tos/maintain/upgrade-to-v6

It would be a bit long but it should work after following the 3 upgrade guides (be sure to select MongoDB in code examples).

Let me know if you are facing any problem during this upgrade process!

rap2hpoutre commented 4 years ago

Let me close this issue, feel free to reopen it if you are facing any problem during this upgrade process!