GithubHelp home page GithubHelp logo

julianesilvac75 / store-manager-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 570 KB

A RESTful API build with Node.js and MySQL

JavaScript 100.00%
bodyparser expressjs mocha-chai msc nodejs restful-api sinon-stub tdd-javascript

store-manager-api's Introduction

Store Manager

Store Manager is a RESTful API build by the principles of MSC. It is a sales manager system where the client can visualize, create, update and delete products and sales.

Technologies

  • Node.js
  • Express.js
  • MySQL
  • Mocha
  • Chai
  • Sinon

Installation and usage

npm install

npm start

  • To run in development mode:

npm run debug

  • To run the tests:

npm run test:mocha

Challenges

The main challenge of this project was to build an app by the concept of Test-Driven Development, which was a first for me, and certainly a big challenge. At first, it was hard to even know how to start. I realised that, usually, when I start to code, I don't have yet a clear path to follow about all the logics and the bussiness rules of the app. So, when I had to start by writing the tests, I had to spend a unexpected amount of time only thinking and planning all the functions. Only then, I understood the importancy of TDD - after breaking that initial bareer of planning first, all the other things came easier, and the development ended up being much faster than usually.

The second main learning I gained from this project was really understand the concepts of stubs and mocks. Working with databases - or even, without the database - helped me understand better how and why we use pre-conceived return for functions on the test environment, and this was a knoledge that I always felt like I missed when I was studying frontend only.

For last (but not least), building well structured layers for the app was a challenge apart, but also a great learning opportunity - it showed me how important organization is for all projects. I do plan to apply a lot of concepts of MSC in the future, not only in backend projects but all of them.

store-manager-api's People

Contributors

julianesilvac75 avatar trybe-tech-ops avatar

Stargazers

 avatar

Watchers

 avatar

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.