ahmeddrawy / my-udemy

rest API using Node js, express, and mongo DB
https://documenter.getpostman.com/view/10819813/TVRefBVx
2 stars 3 forks source link

Make a home page to be redirected to after login #9

Open ahmeddrawy opened 4 years ago

ahmeddrawy commented 4 years ago
emma-r-slight commented 4 years ago

I'd like to give this a go..... :)

ahmeddrawy commented 4 years ago

@emma-r-slight thank you, please make it dynamic and any meta data you want to add to course model or user model please let me know, I'll assign you

emma-r-slight commented 4 years ago

Do you have any preference for a template(view) engine? express-handlebars, pug, dots.....? What information do you want to be listed from the course routes? Do you want just a list with name and tags, do you want to include an external link to the course?

ahmeddrawy commented 4 years ago

I was thinking about ejs but never used it, also I was planning to learn React As a first step we can show their names and tags maybe we can edit the model too to add photos or another metadata What do you think?

emma-r-slight commented 4 years ago

Ok, I have used express handlebars before, which is quite a good stepping stone to react. It separates parts of the page into components similar to React.

For the courses I was looking at the Udemy page, it looks like there's an image( at this point I don't think it needs to be saved in the db, just use a random image from unsplash.com), Title, name of creater and then topic(tags).

Do you have a problem if I add some tests using Jest?

ahmeddrawy commented 4 years ago

Do you have a problem if I add some tests using Jest?

No, I know jest and was planning to have tests but i don't know how until now and will we apply unit or integration testing, what do you think ?

emma-r-slight commented 4 years ago

At this point unit testing, I haven't used Nosql databases before (only SQL Databases) so wanted to write tests for the 'courses' db and api route. This is a great article about testing 'login' if you were interested. It shows how to setup a Mongodb.config file for testing