Git Product home page Git Product logo

maas's Introduction

maas

Memes-as-a-Service

Introduction

This project is an example of a simple REST microservice in go. It is intended to provide "memes as a service".

Using this code

This repo is published under an MIT License which tends to be flexible for the user while still protecting the creator. Please feel free to use this code and also to submit Pull Requests with any fixes/improvements/suggestions/etc. Also, if you use code from the repo I request (but do not require) that you star the repo in GitHub.

All code in this repo was written by me, but much of the code is actually reused from other projects I've done including:

Running the code

Setup development environment

The server uses properties stored in a .env file. To generate said file, from the project root run scripts/create_env.sh. If you want to connect to the DataStax Astra database, you will need to provide a token, otherwise in-memory storage will be used.

Running the Server

From the project root run go run .

Testing the Server

Here are some example CURL commands that can be used to access the running server:

  • curl --header "Authorization: aeca88d8-af10-4316-99cc-4ae3497ce8d0" http://localhost:8081/api/v1/memes?lat=40.730610\&lon=-73.935242\&query=food
  • curl --header "Authorization: aeca88d8-af10-4316-99cc-4ae3497ce8d0" http://localhost:8081/api/v1/councounts/

Prerequisites

  • Go (see the go.mod file for the correct version)
  • Git
  • Database token (optional)

maas's People

Contributors

nathanbak 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.