dan-divy / spruce Goto Github PK
View Code? Open in Web Editor NEWA social networking platform made using Node.js and MongoDB
License: MIT License
A social networking platform made using Node.js and MongoDB
License: MIT License
Hello! I'd like to start contributing, but I have some questions about project guidelines. Would you be interested in establishing a CONTRIBUTING
file?
What is a contributors guide? https://help.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors
Some examples (extracted from the link above):
Some questions I have:
Are you interested in establishing guidelines like this? Would you prefer to do it collaboratively, or solo?
In O-auth login route, I could see that the Mongo DB was checked against a user name existing in the DB as returned from Google Servers. Does this not allow any user to create an email ID with the same name as an existing user and gain access into their accounts? Would email be a better parameter to check against?
I have setup the application but am getting the below error when i run npm start.
[email protected] start C:\Users\Admin\Desktop\spruce-master
node update.js; node ./bin/www
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Users\Admin\Desktop\spruce-master\update.js;'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node update.js; node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Hello, when i run npm start
it's showing this error
npm start
[email protected] start
node update.js; node ./bin/www
Developer key: pxdo2rqHVVw1DMEHeYwXyE9nKwH5b3SxzB5pMVUs
Verify your account in /me with this key
spruce is listening on http://localhost:8000
home/senpai/code/spruce/node_modules/mongodb/lib/core/sdam/topology.js:325
drainWaitQueue(this[kWaitQueue], new MongoError('Topology closed'));
^
MongoError: Topology closed
at NativeTopology.close (/home/senpai/code/spruce/node_modules/mongodb/lib/core/sdam/topology.js:325:38)
at /home/senpai/code/spruce/node_modules/mongodb/lib/mongo_client.js:267:21
at maybePromise (/home/senpai/code/spruce/node_modules/mongodb/lib/utils.js:719:3)
at MongoClient.close (/home/senpai/code/spruce/node_modules/mongodb/lib/mongo_client.js:248:10)
at /home/senpai/code/spruce/node_modules/mongoose/lib/connection.js:711:20
at new Promise ()
at NativeConnection.Connection.openUri (/home/senpai/code/spruce/node_modules/mongoose/lib/connection.js:709:19)
at Mongoose.connect (/home/senpai/code/spruce/node_modules/mongoose/lib/index.js:335:15)
at Object. (/home/senpai/code/spruce/utils/models/keys.js:6:10)`
npm ERR! A complete log of this run can be found in:
npm ERR! /home/senpai/.npm/_logs/2021-06-07T13_48_06_101Z-debug.log
can anyone help me?
Thanks!
I wanna setup image upload to aws, how can I do this? I’m new to aws.
I recently made this: https://github.com/karanpratapsingh/kcards
Hey, I tried to see your demo but it seems to be down.
@DivySrivastava If you have a small amount of time then let's add some tests to make sure things are working such as the database is online etc etc. If you have more time tho work on git-chat
Hi, can you give me the .env file in answer or on discord please ?
my discord pseudo : поднок#9987
So its been a few months since we've commited something to this projects and the lack of time and dedication required is clearly an indication that the project will not be developed actively anymore. So I am planning to either archive spruce or look out for maintainers.
A few points on why archiving is better:
Would like to know your thoughts or if anyone of you are willing to maintain this project.
(cc @dan-divy/creators)
Hi, This is just an question. please tag.
please let me know whether there is any API for all features like browsing feeds etc., If so, Please provide me pointers for the same
We are looking for mobile-first social-networking platform. It seems spruce better suits this case.
@DivySrivastava, when someone changes their username the comment and like breaks, I don't get your system but I , think you do it by username when we should do it by ID, also a post username stays as the old one
Signing in with google or instagram makes a new account every time
Hi whenever i type in npm start it says "dbHost not recognized."
My thoughts:
Here, we update the list as we complete milestones and discuss on them.
List
sadly 😔
Remove API Credentials from the source code before sharing
There is a very popular JavaScript library called leaflet that takes care of maps.
I know that it is not the same thing, but the name will surely cause lots of confusion.
Every time I try to upload avatar for a user, node crashes with the following output:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/Users/username/.npm-global/bin/npm',
1 verbose cli 'start' ]
2 info using npm@5.3.0
3 info using node@v10.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle pudding@4.0.0~prestart: pudding@4.0.0
6 info lifecycle pudding@4.0.0~start: pudding@4.0.0
7 verbose lifecycle pudding@4.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle pudding@4.0.0~start: PATH: /Users/username/.npm-global/lib/node_modules/npm/bin/node-gyp-bin:/Users/username/Documents/Programming/Webs.nosync/Lolz/rekvisits/spruce/node_modules/.bin:/Users/username/.npm-global/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/username/.npm-global/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands/usr/local/mongodb/bin:/usr/local/mongodb/bin
9 verbose lifecycle pudding@4.0.0~start: CWD: /Users/username/Documents/Programming/Webs.nosync/Lolz/rekvisits/spruce
10 silly lifecycle pudding@4.0.0~start: Args: [ '-c', 'node ./bin/www' ]
11 silly lifecycle pudding@4.0.0~start: Returned: code: 1 signal: null
12 info lifecycle pudding@4.0.0~start: Failed to exec start script
13 verbose stack Error: pudding@4.0.0 start: `node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/username/.npm-global/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/Users/username/.npm-global/lib/node_modules/npm/lib/utils/spawn.js:40:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid pudding@4.0.0
15 verbose cwd /Users/username/Documents/Programming/Webs.nosync/Lolz/rekvisits/spruce
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/Users/username/.npm-global/bin/npm" "start"
18 verbose node v10.10.0
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error pudding@4.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the pudding@4.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Using /u/:id should be reversed to /u/:username as users are shown according to their usernames.
Is it necessary?
Hello
I had created this repo months ago and at that time I had to create a temporary fix of the following things:-
// Under utils/handlers/user.js
function like(user, like, _id, cb) {
User
.findOne(user)
.exec((err, obj) => {
// if (!obj) return cb("Does not exist.",null);
//console.log(obj);
for(var i=0;i<obj.posts.length;i++) {
if(obj.posts[i]._id == _id) {
obj.posts[i].likes.push(like.by);
obj.delete(); // Need to fix this
var newUser = new User({
username:obj.username,
password:obj.password,
firstname:obj.fn,
lastname:obj.ln,
dob:obj.dob,
bio:obj.bio,
profile_pic:obj.profile_pic,
posts:obj.posts,
followers:obj.followers,
likes:obj.likes,
lastLogin:new Date(),
});
newUser.save((err, res) => {
cb(err, true);
})
}
}
})
}
In function like(),
I couldn't save the document after pushing the like into the post array of a user.
I tried
obj.posts[i].likes.push(like.by);
// and then simply did
obj.save(() => {});
This is not working...and not saving the updated document.
I pushed the like into post array and then deleted the original doc and then created a new doc with updated like/comment.
Regards,
Divy Srivastava
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.