Skip to content

anywork-dev/microservice-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microservice-dev

This repository is a template for microservice development, designed to be platform-independent. It emphasizes abstraction over implementation, making it adaptable for various environments.

Table of Contents

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/microservice-dev.git
    cd microservice-dev
  2. Install dependencies:

    npm install

Usage

Development Database

Start the development database using json-server:

npm run dev:database

This starts a JSON server on port 8000, serving data from tests/.data.json.

Building and Running Express.js Platform

To build and run the Express.js platform:

npm run build:express

This command:

  • Runs the build script for the Express.js platform.
  • Builds a Docker image for the Express.js platform.
  • Uses docker-compose to start the containerized application.

Building and Running Cloudflare Platform

To build and run the Cloudflare platform:

npm run build:cloudflare

This command:

  • Runs the build script for the Cloudflare platform.
  • Builds a Docker image for the Cloudflare platform.
  • Uses docker-compose to start the containerized application.

Project Structure

microservice-dev/
├── src/
│   ├── platform/
│   │   ├── express/
│   │   │   └── build.js
│   │   ├── cloudflare/
│   │   │   └── build.js
│   └── ...
├── tests/
│   └── .data.json
├── build/
│   ├── express/
│   ├── cloudflare/
├── Dockerfile
├── docker-compose.yml
├── package.json
└── .dockerignore

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for more details.


Let me know if you need further adjustments!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published