invent-ed / devleague--articles-products-and-express Goto Github PK
View Code? Open in Web Editor NEWThis project forked from devleague/articles-products-and-express
This project forked from devleague/articles-products-and-express
You can totally dry this up so that you can build a module to handle successful and failed methods.
A function can take in some arguments and build the response you want to produce in those routes.
Doing this would be a step towards the OOP life and allowing your functions to dynamically build things for yourself without a lot of repeating
To practice good file structure, lets move your To.js
file into a helpers directory so that your project can look clean and organized!
https://github.com/edsperanto/devleague--articles-products-and-express/blob/master/server.js#L7
You can totally build a middleware for this to dry up your code.
https://github.com/edsperanto/devleague--articles-products-and-express/blob/master/server.js#L7
For development you should never use port 80
designated or not -- it is a reserved port
Best practices for starting these kinds of servers is to use a non-reserved port.
When we get into deployment and devOps we'll learn how we can route our applications on public servers.
Not best practice.
Pull them out and put them into a public assets folder.
Remember express can serve public assets that your views can tap into thats where you want to store your css and javascript.
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.