![]() ![]() ![]() We will also use a public folder to serve our static output.css file, so create that directory, add your css in there and add this line to your code app.use('',express.static(path.join(_dirname, 'public'))) We will fix this using express routing to allow static files to show up Express Server SetupĬreate an index.js file and initialize express js. Next, we will make a dashboard.html (logged in page) ĭon't worry about the style sheet not loading. npm install express Starter HTMLįirst, we will make an index.html (home page) A real project would be more complex and need a few more things, but we will build off of this. Luckily, we only need express js for this project. Additionally, I made two pages: index.html, and dashboard.html, which will serve to direct the user to login with discord, and then show them their logged in state.Īdditionally, the "server" is handled using express js. I made a CSS stylesheet using tailwind that is included in the source files. ![]()
0 Comments
Leave a Reply. |