Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W14-Project-mongo-api-Yia #486

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Citronskal
Copy link

Netlify link

https://project-mongo-api-qbfp.onrender.com/

Collaborators

solo

Copy link

@AntonellaMorittu AntonellaMorittu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Yia, your code looks well-structured and organised. Well done completing your first DB! 👏 Your code indeed meets the specified requirements, nice! 😎 Don't forget to format your code 🧹

const port = process.env.PORT || 8080;
const app = express();

const Song = mongoose.model("Song", {
id: Number,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove id from the Schema: Mongoose automatically assigns a unique _id field to each document, so you don't need to define the field in your schema, you can even remove it from the data object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants