irlnathan / activityoverlord Goto Github PK
View Code? Open in Web Editor NEWAn application I'm building to learn sails.js
An application I'm building to learn sails.js
Your links in the readme are from localhost:4000 for ep 4,5,6
Hi, just finished watching the videos and I'm impressed. I cloned this project to my local machine and installed the necessary additions via npm, sails lift and I am able to load it in my browser, but there's no styling at all, just bare HTML. I checked and double checked that bootstrap.css is loaded in the browser and within the app, and it seems to reference the file just fine, but displaying the page shows no styling at all. Any help?
Hi, looks like assets in activityoverlord1.herokuapp.com already concated and minified, can you open sourced the activityoverlord1.herokuapp.com ?
Btw, your SailsCasts is awesome!
Hey there,
Thanks for the tutorials. I learned a lot about sails.js because of you.
Anyway, I'm confused with the unique: true model attribute for validation. It returns a different format than other validators like maxLength etc.. this is the error being returned by unique:true - MongoError: E11000 duplicate key error index: sails_twitter.user.$username_1 dup key: { : "ken" } while maxLength etc.. returns - { ValidationError: { password: [ [Object], [Object] ] } } . Because of that I can easily render the error messages for maxLength, minLength etc.. but having a hard time on how to display the error message for unique: true; rule because the error message is a different format.
Also, I can't see the unique rule in anchor.js w/c is used by waterline.js for validation - https://github.com/balderdashy/anchor/blob/master/lib/rules.js
is unique rule really supported?
While low priority, I'd like some help wrapping my head around this.
In /config/policies , 'UserCanSeeProfile is being called when accessing the User model. This works when accessing localhost:1337/user - we get redirected to /session/new to login. But if one accesses /user/show (or /edit/ /update) - a type error is thrown.
500: TypeError: Cannot read property 'id' of undefined
I've looked into this, and the toJSON function is not automatically called by sails. What this means is that the user list page http://localhost:1337/user serves all encrypted passwords as does each individual user page.
All instances of User objects served to a view come with their encrypted password attribute intact.
It appears that the toJSON() method must be called explicitly for each view, as well as on the entire collection for the show controller method.
The fix is individually using toJSON on individual views and
index: function (req, res, next) {
User.find(function foundUsers (err, users) {
if (err) { return next(err); }
var cleanUsers = [];
_.forEach(users, function(user) {
cleanUsers.push(user.toJSON());
});
return res.view({
users: cleanUsers
});
});
Hello Irl,
I love everything about sails, and the sails casts, and you. Thank you SO much for the work you've done, it's been very helpful for my growth as a coding noob.
So, I'm on the part where we switch over to mongo and you use the adapter.js file to set it up. Sails doesn't make an adapter.js, I read that you moved the adapter to local.js but things are set up a little differently than what is shown in your video.
Is there an update on the github that I'm missing or is this supposed to work the same way?
@irlnathan Thank you so much for this tutorial. It's been a huge learning opportunity for me.
I wanted to play all the videos in order but neither the playlist on youtube nor the blog allowed me to do it easily. The playlist was in the backwards order and the blog requires i click on the next episode manually.
I created a playlist of the videos in correct order, [url]http://www.youtube.com/playlist?list=PLWsZeJCry-F4K4iRImeB3-i0S5mw9Ak-W[/url], but of course that will get out of date if you add any more vids. You are free to publicize my playlist or you can create you're own in that order.
Thanks for the awesome work!
Would be great to have branches per episode so we can follow along and diff the changes
Ep 4,5,6 point to localhost:4000
Hello,
I might be missing something but it seems that if an admin(A) removes user(U)'s admin permission while U was logged in as an admin then he can still restore his admin status.
What would be the right approach to avoid this situation where the session object becomes outdated?
Having a problem "lifting the sails" on this demo. I have installed sails (0.9.8) just fine globally, but getting warning regarding sails version and the demo's dependency on 0.9.7. Also getting failures on undefined connection in the /sails-mongo/lib/adapter.js:77.
Are there dependency errors with the latest Sails and/or MongoDB versions? Tried reinstalling both to latest, to no avail.
What is the best process for installing and running the app to overcome these errors?
Thanks for any help with this...
there is a version change to 0.10 that breaks in ep 19,20,21 ...
Everything that has to do with socket.io is broken.. looking
for a fix. any help??
I am using your app.js file and i have an error like a Uncaught TypeError: socket.get is not a function when i am trying to make a requet socket.get("/user/subscribe");
but in browser console sails.io is connected .
this is what i see in console
Connecting to Sails.js...
app.js:20 Uncaught TypeError: socket.get is not a function
|> Now connected to Sails.
___/ For help, see: http://bit.ly/1DmTvgK
(using browser SDK @v0.11.0)
Hi,
going through your sails episode.Show,edit and delete action dont work..server waits and crash giving "FATAL ERROR: JS Allocation failed - process out of memory".
My sails version 0.10.5.
Am I incorrect that the user subscribe call (https://github.com/irlnathan/activityoverlord/blob/master/api/controllers/UserController.js#L162) will query all users from the db?
If so, is there another way to subscribe that doesn't query the db? That is a lot of unused information being transferred from the data source to the sails app.
**/Users/fred/Sails-Projects/activityOverlord/api/controllers/SessionController.js:102
res.redirect('/user/show/' + user.id);
^
TypeError: Cannot read property 'id' of undefined
at /Users/fred/Sails-Projects/activityOverlord/api/controllers/SessionController.js:102:39**
Something wrong here that you did not cover and cannot find any comments on SailsCast that address this.
This was just after completing: Building a Sails Application: Ep14 - User Authentication and Restricting Access Through Policies.
Any help is much appreciated.
Kind Regards,
Fred Shequine
Web Developer
thanks very much for the tuts!
since sails 0.10 has lots of changes , i wonder if there is a "0.10 version" of activityoverlord?
So I've powered through all 20 episodes of Sailscasts in a day following along with all the work on Activity Overlord and two things keep bothering me....
Sails is incredible and all of this seems too good to be true
You are way too awesome for life for putting together such a clear and concise tutorial. Its been an incredible experience and I'll definitely be using Sails and the concepts I've learned from your videos moving forward.
Thanks for all the work you've put into this to help other people learn! The internet needs more of that!
Great screencasts! Could you create one on file uploads with progress notifications in the new future? Thanks
thx for all your support so far learning me sails
i tried to use [i18n]: https://github.com/mashpie/i18n-node i tryed a lot of diffent method but __ is not defined in my layout / view file
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.