pbscoots / expresso Goto Github PK
View Code? Open in Web Editor NEWCapstone API Project
Capstone API Project
https://github.com/PBscoots/Expresso/tree/master/server
Great job breaking your API down into multiple routers to keep your API as modular as possible. This is a great way to keep your routes independently organized, maintainable, and testable. ๐
https://github.com/PBscoots/Expresso/blob/master/server/routes/employees.js#L11-L39
Route params and subrouters help remove repetition from your route paths and that's one less place where you could potentially introduce a bug to your application. Nice ๐
You've applied a lot (or all) of the most important concepts from the Express unit into this API and have kept your code very well organized. Awesome job ๐
Satisfactory ๐
You've written some great code here. You've demonstrated an exceptional understanding of the material and have applied it with a great care and efficiency in your Express API and SQLite database. You've also demonstrated a clear proficiency with JavaScript objects and arrays as well as the general procedure of accessing requests and serving responses.
If a lot of this seems repetitive, know that it is. A key part of designing a RESTful API is being able to expose resources in a very specific, standardized way. You want your API to be as normalized as possible so that others have an easy time using your service.
You're well on your way to designing and developing APIs, great job!
https://github.com/PBscoots/Expresso/blob/master/migration.js
Nice job creating your various database tables. ๐
Even better that you used ES6 template literals so that you can write each SQL command over multiple lines. This improves readability significantly over writing commands entirely on a single line.
You only need a single db.serialize()
call here, though. All of the db.run()
calls when placed in a single db.serialize()
method call will be performed in that order (in series, not in parallel).
https://github.com/PBscoots/Expresso/blob/master/server.js
This a very nicely organized entry point to your application. Good job setting up appropriate logging, request parsing, cors, error handling, and router middleware as well as leaving comments so it's plainly evident what each block of code is doing. ๐
It's a common convention to write all of your require()
statements at the top of the file, though, and then use them or mount middleware as necessary throughout the rest of the file. Following this convention makes it easier for other programmers (and other development packages as well) to quickly determine the libraries your file depends on.
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.