Project <정리중>/TimeTube - Web Video8
Project note This project is paused due to change of plan for doing frontend sector first. Will be resumed when I do use Node.js later.
Extra - What is res, req? next? (node.js + express) res and req are objects? next is parameter??? Are they functions? These are middleware function. [res, req] are definitely middleware function. next is function - work somewhat like callback + middleware function. From documentation: You can provide multiple callback functions that behave like middleware to handle a request. The only exception is that these callbacks might invoke next('route') t..
Nodejs - EP 6 , MVC pattern Note. M = Data V = How does the data look like C = function which looks for the data So, why MVC all of sudden? To separate both 'URL' and 'function' for the sake of my mental health. By separating the URL sections to (1) another file with (2) another name of folder, let the folder name 'controller', and let that controller be the place to importing site for 'routers (folder)'. What this mean is..
Node.js EP 5 - routing To share the code contents of specific file (e.g. let app.js to share the code with init.js) Need to add 'export default app;' to the origin source. So, it can literally export so! 'export default app;' is the code. Then import it as follows: 'import app from "./app";' Now, here is all about 'routes'. How to use router? Router is the file which contains many route. 1. To let it work as router (d..