React Native - can't import mongoose on the front end(but it works from the backend)

后端 未结 2 806
抹茶落季
抹茶落季 2021-01-29 05:21

I cant import mongoose on the frontend but it worked on the backend.

I have a separate directory for the backend. I have some code to add a couple users to my database.

2条回答
  •  灰色年华
    2021-01-29 06:10

    Just today I found out about Mongoose's browser module while trying to solve similar problems to you. It's a very limited version of Mongoose but will let you do validation against schemas, for example, on the front-end. Sorry I only found this 6 months after your post.

提交回复
热议问题