Giter Site home page Giter Site logo

expresso's Issues

API

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 ๐Ÿš€

Summary

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!

migration.js

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).

server.js

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.