mongodb-developer / mern-stack-example

Mern Stack code for the Mern Tutorial
Apache License 2.0
292 stars 260 forks source link

Mern Tutorial web page has an old record.js sample code #17

Closed pat9579r closed 2 years ago

pat9579r commented 2 years ago

On the tutorial web page, the record.js offered uses person_name, person_group, person_level which do not map to the forms and cause display issues.

Also, the last line of the delete record uses: response.status(obj); instead of response.json(obj) which prevents the recordList component from updating.

These will trip you up if you just try to "code along" and use the sample code from the tutorial web page. Code found here in github has these changes and works as expected.

In some cases "myFirstDatabase" is used, in others "employees" is used. Probably best to create a single process.env.DATABASE in config.env for consistency.

joellord commented 2 years ago

Good catches! Thank you so much for letting us know, we will fix those as soon as possible.

joellord commented 2 years ago

The article has also been updated. Thank you for reporting those issues.