quiz_1's People
quiz_1's Issues
Marking - Feb 10th
Good job! Most of the functionality and layout elements are there. Right now you're sitting at 80% - if you can make the dashboard work on mobile then it'll be ๐ฏ% ๐
I really like how you used an array for the "trending" tweets instead of hardcoding them into the view. This decouples the data from the display, which would allow you to calculate the trending topics in a different way without changing your layout code.
You're calculating a date in the get
function, but ideally you would calculate the date that each was posted and store it in the cookie alongside the username and text.
Additionally, the way you're passing req.cookies
to the view means that you may get some unexpected data. Cookies are managed on a domain basis, meaning that over time you'll build up a bunch of different cookies for localhost
for the various applications you're working on. Iterating over req.cookies
will inadvertently display data that aren't actually tweets!
A better approach would be to create a tweets
key:
// storing a tweet
let tweet = req.body;
res.cookie('tweets', tweet, { maxAge: 2592000000 })
// retrieving all the tweets
let cookies = request.cookies.tweets
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.