kwhinnery / todomvc-plusplus Goto Github PK
View Code? Open in Web Editor NEWTodoMVC++ Sample Application
License: MIT License
TodoMVC++ Sample Application
License: MIT License
Using our Sass stylesheet, update the color and font for the main title to something a little more readable. Use the same color for the links in the footer of the UI. Make sure that you can change the color for both using a single variable!
The application today doesn't track the status (complete/incomplete) of a Todo item. Update the REST API (not the front end for now) to create new todo items with a default completed state, and for the update operation to toggle an item complete or incomplete.
I'm having the following error when trying to run
sequelize db:migrate
Sequelize [Node: 8.4.0, CLI: 2.8.0, ORM: 1.7.5]
Loaded configuration file "db/database.js".
Using environment "development".
TypeError: Parameter "url" must be a string, not object
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at new Sequelize (/mnt/shared/lib/node_modules/sequelize/lib/sequelize.js:59:22)
at getSequelizeInstance (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:394:12)
at getMigrator (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:403:21)
at Object.task (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:23:14)
at /home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/helpers/gulp-helper.js:17:23
at tryCatcher (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at new Sequelize (/mnt/shared/lib/node_modules/sequelize/lib/sequelize.js:59:22)
at getSequelizeInstance (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:394:12)
at getMigrator (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:403:21)
at Object.task (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/tasks/db.js:23:14)
at /home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/lib/helpers/gulp-helper.js:17:23
at tryCatcher (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/ubuntu/.nvm/versions/node/v8.4.0/lib/node_modules/sequelize-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
In case someone doesn't have the Sequelize CLI installed globally, it would be nice to be able to at least execute the migrations for the app without installing sequelize-cli
globally. Create an npm script that accomplishes this task. Then, create a Grunt shell command which executes this script.
There might be something there already that does this as part of the startup process, but let's make a special purpose npm script.
Hello,
When I run sequelize db:migrate
I get the error below:
Sequelize [Node: 6.10.1, CLI: 2.7.0, ORM: 3.30.4]
Loaded configuration file "db/database.js".
Using environment "development".
Unable to connect to database: SequelizeConnectionError: password authentication failed for user
How do I fix it? So far nothing on Google has worked.
Thanks.
It would be nice to provide some HTTP level logging for our Express server. I've heard that Morgan is a nice option for this.
We'd like to know how many users are taking advantage of the filters on our TODO list. Using universal analytics, track custom events with the category filter
and the action one of all
, active
, and completed
.
Getting this issue while running the migrate command on Windows
Unable to connect to database: SequelizeConnectionError: password authentication failed for user "XXXXX"
A storied Twilio tradition is adding the X-Shenanigans: None
header to every HTTP response we send. Create an Express middleware to do this, but only for /todos
routes.
Let's improve our back-end test coverage a little bit and add some integration tests that cover both our model and controller logic. Write a test for the todos controller that exercises one of the CRUD operations. You'll have to mock the Express request/response objects somehow.
I have tried to run grunt to build from the README and I get an error that init_static
is not a task
grunt.registerTask('collect_static',
['init_static', 'sass:dist', 'browserify']);
Was this fixed before I joined or am I missing something?
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\neetesh\todomvc-plusplus\npm-debug.log
Right now, the UI doesn't update the completed status of a TODO item, even though yesterday we added that functionality using the REST API. Let's update our TodoMVC UI to keep track of these changes, and make use of the new property we added to the database.
Our front-end JavaScript just isn't progressive enough yet. Instead of just the ES2015 presets, we'd like to include the ES2016 set as well. Consult the transform docs to se how this might be done.
Right now, we immediately add a new todo to our Vue component's list, even before we save it on the server. This gives the appearance that the addition is happening in real time.
Let's implement this feature with socket.io. On the client side, create the TODO via ajax like we are right now, but don't automatically add the TODO to the Vue component's list. Instead, create a socket.io client-side event handler to add the TODO to our list when an event is emitted from the server.
On the server, whenever a new Todo is created, broadcast a message to all connected sockets that a new Todo has been added. Then, every connected client's UI should update in real time as TODOs are added!
By default, Express sends an X-Powered-By header that indicates that Express is the web server behind the request. Generally speaking, you don't want to allow evildoers to know specifically what technology is serving your page, to prevent targeted attacks.
Disable this response header by any means necessary. I think there's some middleware that does this? Maybe an Express configuration option?
Right now our back end app doesn't do much in the way of error handling. Let's start to patch that up by at least sending errors in our Express app to the Rollbar service. I wonder if Rollbar has a middleware just for Express applications...
the database.js file under db is missing 'use strict' which cause issue "Block-scoped declarations (let, const, function, class) not yet supported outside strict mode" when you try to do db:migrate
Add a UI element to the bottom of the Todo list UI that allows the user to select a "light" or a "dark" theme for the UI. Add a class to the main UI div tag to allow you to add styling for a new "dark" theme.
Bonus points - save the user's theme preference in localStorage and load it when the page loads.
npm install sequelize failing with the following error:
npm ERR! 404 Not Found: @types/geojson@^1.0.0
Implement Google Analytics pageview tracking. Create one pageview on initialization, and then others in the router used by the Vue application, such that #/all
and similar count as pageviews as well.
Only execute the tracking code in the production environment! Make sure that you accurately check this in your code - remember that browserified code will not have access to process.env.NODE_ENV
in the browser.
When we build static assets for production, we currently minify CSS but don't compress our javascript. We should uglify our JavaScript using Grunt, and add that to the collect_static
task.
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.