Giter Club home page Giter Club logo

express-example's Introduction

Express Example API

Test microservice using ExpressJS

Local Setup

  1. Ensure you have GIT installed locally.
  2. Ensure you have Node 16.15.1 LTS installed
  3. Ensure you have Brew installed (for MacOS only)
  4. Clone the repository with the following command: git clone https://github.com/isaiah-moran/express-example.git
  5. Navigate to the newly cloned repository
  6. Install dependencies with npm install
  7. Start the app with npm run dev

Building Docker & Running Image

  1. Ensure you have Docker Desktop installed and running
  2. CD to the root of the express-example directory
  3. Run the following in your terminal: docker build -t express-example-docker .
  4. Run the following in your terminal: docker run -p 3000:3000 express-example-docker

Flexing the API

Once you've either set yourself up for local development or started running a built docker image of the website use postman or CURL and run GET request against the following endpoint: http://localhost:3000/v1/ping

Notes

Hot Reload with Nodemon

This API has been instrumented with Nodemon when running in DEV mode which will trigger a re-compile and re-run. This is extremely helpful when dealing wth static assets like translations.

Swagger

This API has been instrumented with Swagger, when running the API locally or via Docker the docs may be found by navigating to http://localhost:3000/api-docs. These docs are automatically generated on API start via syntax that can be found in the routes files.

Tips

Switching Node Versions

If you're actively developing against multiple versions of Node it can be useful to install Node Version Manager (referred to as NVM). This can be found at the following site: https://github.com/nvm-sh/nvm

express-example's People

Contributors

isaiahmoran avatar

Stargazers

OliverOdo avatar

Watchers

James Cloos avatar  avatar

Forkers

olivierodo

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.