Comments (6)
That's strange, did you edit some lines of my code? I can update the cats without any issue. What version of MongoDB and Node you have? Did you create the "cats" database by yourself (it should be created automatically) or you add any index? Does you receive any error in browser console too (F12 in Chrome)? Check also the "Network" tab (I'm using Chrome: F12 -> Network) while you edit the cat and tell me what you see there. There should be a successful PUT request (the edit) with the new data.
from angular-full-stack.
I was making changes in the code, but now the problem persists after pulling fresh copy's of the repo without code changes. I have not created any databases myself.
I get no console errors and the network call status is 'pending' when I click save after updating.
$ mongod --version
db version v2.4.9
node -v
v6.0.0
I'm starting to suspect that this is an outdated mongo problem.
from angular-full-stack.
I think you are right, please update MongoDB (I've 3.2.8) and let me know if it persists. Also note that I didn't test it with Node 6.x, I've 4.4.7.
from angular-full-stack.
I have updated mongoDB to 3.2.8 and updating records works again, thanks !
If I may make a suggestion for the app it'd be:
- maybe an auth functionaility (jwt tokens?) for securing the routes with canActivate
- and an api (secured) for safe data calls to th server
Thanks for the help and for sharing the project. I like its simplicity , ideal for learning MEAN with angular2. Now I'll try to replace mongoDB with mongo lab.
from angular-full-stack.
Good!
About the suggestions:
- authentication is not a simple task and can be accomplished in multiple ways. I want to keep the project very simple. I don't know if I will add it in future (maybe in a separate project with Angular 2 final). Btw JWT is a good way to do it.
- do you mean secured api calls so that only authorized users can call /api/xxx? If so, yes it should be implemented because now everyone can call update and delete api calls and this is not really cool...
About mLab I think you just need to edit line 18 of server.js, so that you can use a remote mongo database.
from angular-full-stack.
It might indeed be better to wait for the final Angular 2 release and make it a seperate project, and for the API I mean indeed that only authorized users can make calls so it relies on the authentication.
And thanks for the mlab tip !
from angular-full-stack.
Related Issues (20)
- Error when deploying app to AWS EC2 HOT 3
- list dir tree creation duplicates server folder HOT 1
- Error running dev & prod scripts HOT 1
- body parser package could be removed
- Session Management HOT 3
- JWT token validation is not working HOT 1
- Error while running "npm run dev" command
- After install error HOT 2
- Wildcard instead of controllers?
- How to test the server in Postman HOT 2
- Two mongo connections are opened HOT 4
- Cannot login with prod bundle (working on dev)
- Not able to run on docker compose HOT 2
- How to expose port 80 in production? HOT 2
- Migrate TSLint to ESLint HOT 1
- Fix e2e tests HOT 1
- Update to Angular 12 HOT 1
- Proxy Issue HOT 1
- Upgrade Bootstrap to v5 HOT 3
- Upgrade to Angular v14 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-full-stack.