2

I want to use MongoDB with Angular JS without using ExpressJS or NodeJS or anyother layer in middle.

Regards

1
  • 2
    You need some sort of server-layer to connect to the MongoDB instance, unless such service exists that allows you to interact with a Mongo database using REST. MongoLab has such feature, but shouldn't be used on the client-side as you are exposing the API key, therefore jeopardising the security of your application. Commented Jul 7, 2014 at 10:19

1 Answer 1

1

Impossible, unless you want to give users of your AngularJS application full access to your server (do not exclude possibility of rootkits through MongoDB application).

Middle server is needed as a gatekeeper: pass through only legitimate requests to database, blocking any sensitive or restricted data passing to user.

The fact that you are strugglying to find a client-side JavaScript to communicate with MongoDB is a good sign that such practice is discouraged.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.