fullstack-hy / fullstack-hy.github.io Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://fullstack-hy.github.io/
License: Other
Home Page: https://fullstack-hy.github.io/
License: Other
Following the material on https://fullstackopen.com/en/part12/building_and_configuring_environments, when at the part "Persisting data with volumes", after spinning the containers up and visiting http://localhost:3000/todos
, the error pops up.
MongooseError: Operation `todos.find()` buffering timed out after 10000ms
Followed the steps correctly and tried to debug with docker exec
, the said database, collection and documents are all there, but when tried to retrieve using Mongoose, such error occurs.
EDITED:
After some troubleshooting, finally realized I have executed this line separately:
MONGO_URL=mongodb://the_username:the_password@localhost:3456/the_database```
```sh
npm run dev
instead of one whole line. Sorry to think that by splitting them up would achieve the same result, but it might be a good point to highlight to beginners especially those that are not too familiar with shell.
Thank you.
In Osa2 when first introducing lifecycle methods, componentDidMount
is said to be called just before render
is called for the first time
https://github.com/FullStack-HY/FullStack-Hy.github.io/blame/master/osa2.md#L1298
The same is said in Osa5, which references Osa2. Additionally, this is stated in Osa5
Kyseessä on siis ns. lifecycle-metodi, jota React-kutsuu juuri ennen kuin komponentti ollaan renderöimässä ensimmäistä kertaa.
https://github.com/FullStack-HY/FullStack-Hy.github.io/blame/master/osa5.md#L528
However, the official React docs state that componentDidMount
is called after render
is called. https://reactjs.org/docs/react-component.html#componentDidMount
Additionally the docs state
Calling setState() in this method will trigger an extra rendering, but it will happen before the browser updates the screen. This guarantees that even though the render() will be called twice in this case, the user won’t see the intermediate state.
So the method render
is called before componentDidMount
, but the actual rendering of the page, which is done by the browser, happens after it.
Could the authors clarify this part a bit, and possibly introduce componentWillMount
, which is actually called before render
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.