facg2 / fac-mentorship-schedule Goto Github PK
View Code? Open in Web Editor NEWA web app to schedule mentors for every week in the cohorts
A web app to schedule mentors for every week in the cohorts
It would be great to see your app hosted on Heroku!
Because of the environment variables it is a lot harder for people to just pull and run locally, so hosting really helps on these projects.
Generally, in javascript you'll use camel case (likeThisKindOfWriting), in some languages and such peope also use snake case (snake_case_is_like_this), in your queries/db_functions.js
file you have a snake case variable name (cohort_mentor) alongside all your camel case names, I would recommend changing this to make it more consistent.
Our database mustn't stay locally, we should host in heroku
I raised the same issue elsewhere so I will jsut link to that, take a look here: FACG2/project-manager#40
For you it is in your queries/db_functions.js
file, in addCohort, addMenetor, and cohort_mentor.
getData(cohort, (err, res) => {
if (err) {
console.log(err);
} else {
res.map((object, i) => {
weeks[object.num].mentors.push(object.githubuser);
weeks[object.num]['title'] = object.week_title
})
cb(null, weeks);
}
})
}
cb(null, weeks) is not an argument for this function, you need to add it and need to add the callback in error case so you can handle the error in the callback , like this
if (err) {
console.log(err);
cb(null);
}
in line15
you hard coded the constant.where you can simply make small loop to make it or just construct the key when you need it in the code you using this function
in db_build.js why you call buildDatabase function ?
in this function
fac-mentorship-schedule/src/handlers.js
Line 65 in d03a969
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.