GithubHelp home page GithubHelp logo

imvictorm / smith-api Goto Github PK

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

Medieval Items API ⚒️

Shell 0.42% TypeScript 99.58%
api crud docker docker-compose express-ts insomnia-rest joi-validation jsonwebtoken mysql2 ts-node

smith-api's Introduction

Smith API 🔨

Project Context 💡

Medieval items Store, in the format of an API, following the MSC architecture (Model -> Service -> Controller), where you can do the basic operations you can do in a database (CRUD). That's my first project using Typescript 💙

Acquired Knowledge 📖

In this project, I was able to:

  • Configure a Node.js project with Typescript;
  • Create an Express application using Typescript;
  • Use classes and interfaces to structure the MSC layers;
  • Declare variables and functions with Typescript typing;

Main Technologies used 🧰

TypeScript Express Node.JS MySQL JWT Joi Docker Insomnia
typescript express nodejs mysql jwt joi docker insomnia

Running the application ⚙️

  1. Clone the repository and enter it
git clone [email protected]:ImVictorM/Smith-API.git && cd Smith-API

Methods

🐋 Running with docker (recommended)

You must have docker and docker-compose installed

  1. Get the containers running
docker-compose up -d
  1. Enter the server's container
docker exec -it trybesmith bash
  1. Install the dependencies
npm install
  1. (Optional) Create/recreate and populate the database

if this step fails, wait a while untill the mysql container is running propperly

npm run db:create
  1. Start the server
npm run start
---- or ----
npm run dev (with nodemon)

🖥️ Running locally

You must have node and MySQL installed

  1. Install the dependencies
npm install
  1. Rename the file .env.example to .env

  2. (Optional) Create/recreate and populate the database

npm run db:create
  1. Start the server
npm run start
---- or ----
npm run dev (with nodemon)

Endpoints 🌐

Click here to export automatically:

Run in Insomnia}

Or just import the file insomniaRoutes.json inside your environment: https://docs.insomnia.rest/insomnia/import-export-data

smith-api's People

Contributors

imvictorm avatar trybe-tech-ops 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.