Coder Social home page Coder Social logo

albo's Introduction

Albo

Syncs marvel comics to local and we expose the data.

Technology

Colaboratos service

  • Golang (Gin)
  • NoSQL (mongodb)
  • DB Sync (goroutine)

Characters service

  • Node (Nestjs)
  • NoSQL (mongodb)
  • DB Sync (onModuleInit)

Environment variables

Variable Type Description Default
MONGO_URI string mongo uri string mongodb://mongo_albo:27017
DURATION int interval time to sync (minutes) 60
DB_NAME string db name albo

No needed to set something at the moment

Requirements

  • docker
  • docker-compose

Run project

# Clone repo
$ git clone [email protected]:BraulioAguilarDev/albo.git

# Go to albo directory
$ cd albo

# Create and run the containers
$ make dc-up

# Remove all
$ make dc-down

Test endpoints

Note: For sharing the same endpoint localhost we are using a nginx proxy_pass

GET: http://localhost/marvel/colaborators/ironman

{
	"last_sync": "08-07-2023 18:21:51",
	"editors": [
		"Tom Brevoort"
	],
	"writers": [
		"Peter Milligan",
		"Michael Avon Oeming",
		"J. Michael Straczynski",
		"John Miller",
		"Mark Ricketts",
		"Chuck Austen",
		"Stan Lee",
		"Brian Michael Bendis"
	],
	"colorists": [
		"Liquid! Color",
		"Jason Keith",
		"Wil Quintana",
		"Laura Villari",
		"Paul Mounts",
		"J. D. Mettler",
		"Edgar Delgado",
		"Christopher Sotomayor",
		"Frank D'ARMATA"
	]
}

GET: http://localhost/marvel/characters/ironman

{
	"last_sync": "Sat Jul 08 2023 18:21:53 GMT+0000 (Coordinated Universal Time)",
	"characters": [
		{
			"character": "Wolverine",
			"comics": [
				"Wolverine Saga (2009) #7",
				"Secret Invasion Infinity Comic (2023) #18"
			]
		},
		{
			"character": "Avengers",
			"comics": [
				"Avengers Unlimited Infinity Comic (2022) #53",
				"Avengers Unlimited Infinity Comic (2022) #52",
				"Avengers Unlimited Infinity Comic (2022) #51",
				"Secret Invasion Infinity Comic (2023) #15",
				"Secret Invasion Infinity Comic (2023) #16",
				"Secret Invasion Infinity Comic (2023) #18",
				"Avengers Unlimited Infinity Comic (2022) #50",
				"Avengers Unlimited Infinity Comic (2022) #49",
				"Avengers: Electric Rain Infinity Comic (2022) #13",
				"Avengers Unlimited Infinity Comic (2022) #30",
				"Avengers: Electric Rain Infinity Comic (2022) #12",
				"Avengers: Electric Rain Infinity Comic (2022) #11"
			]
		},
		{
			"character": "Captain America",
			"comics": [
				"Avengers Unlimited Infinity Comic (2022) #53",
				"Avengers Unlimited Infinity Comic (2022) #52",
				"Secret Invasion Infinity Comic (2023) #15",
				"Secret Invasion Infinity Comic (2023) #18"
			]
		},
		{
			"character": "Serpent Society",
			"comics": [
				"Avengers Unlimited Infinity Comic (2022) #53"
			]
		}
	]
}

TODO

  • Testing: Like we are using interfaces we can implement testing with testify.

  • Documentation: I would propose using swagger.

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.