Code Monkey home page Code Monkey logo

fast-shopping-backend's Introduction

FastShopping Server

Forks Stargazers Issues-open Issues-closed Contributors contributions welcome

Logo

Shop System

RESTful server powered by MySQL and Express.js

๐Ÿ–Š๏ธ๐Ÿž Report a Bug ๐Ÿ™‹โ€โ™‚๏ธ Request Feature

Live at fast-shopping-backend.herokuapp.com

Table of Contents

Features

Framework javascript nodejs mysql heroku

  • Async/Await support
  • WinstonJs Logger Implementation
  • Error Handling
  • MySQL Migrations and Seed Support
  • Basic request parameters Validation
  • Open Api Specification implemented through swagger and swagger-ui
  • Enviroment variables to hold configuration values .env file
  • Functional Programming with Middlewares and helpers
  • Standard Coding with Eslint and Prettier, this helps to keep thing into prespective.

JavaScript Style Guide

How to use it

This code is meant to be run in a server accesible online, so other services can use it, in this case a shop/store frontend. This is a Rest Api solution using basic database create, read, update and delete operations (CRUD).

I use a RESTful API to be used by any other client, but for human readability I also added swagger (it can even be used as an ad hoc admin panel!). To use it from a client you need to make HTPP(S) requests, for example using curl:

> curl https://fast-shopping-backend.herokuapp.com/ping -v

But you can use any language or library: PHP, GO, C++, Rust, etc.

Some interesting endpoints:

  • GET / - Swagger Documentation
  • GET /api/v1/tickets/all - (protected by JWT) Get all the tickets

More info in the swagger documentation Live Here

Getting started

Visit the installation instructions to learn more about how to setup your PC for run the server!

Code Overview

This backend's code is made using JavaScript language, and Node.js runtime. With a package named Express.js I managed to create the server, routers and middleware necesary. Also MySQL is used to provide a modern, open sourced and perfomant database layer. Lastly, the server have auxiliar packages for development and deployment to ensure is production ready, enterprise level.

As with most of node.js applications, we would want to install node and npm in our local PC in order to run the server or develop code. This folder include all the necesary files to run the server local or online, just take into account that you'll need to use a terminal as no GUI is available yet.

If you want to develop you have to setup a good dev environment. First of all a good text editor/IDE, I prefer to use Visual Studio Code, but you can use anything else. For the use of VSCode I provide configuration files in the hidden folder .vscode.

For more information about the code please check the code overview.

Author

Contributing

contributions welcome

๐Ÿค Contributions, issues and feature requests are welcome! Feel free to check the issues page. Be sure to review the contributing guidelines.

Happy programming ๐Ÿ˜ƒ โœŒ๏ธ

Show your support

๐Ÿค— Give a โญ๏ธ if you like this project!

Icons from:

Icons8 Icons8

License

License

๐Ÿ“ This project is licensed under the Apache 2
Feel free to fork this project and improve it

fast-shopping-backend's People

Contributors

israel-laguan avatar dependabot[bot] 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.