Giter VIP home page Giter VIP logo

cloudflare_workers's Introduction

Project logo

cloudflare_workers

Status License


The backend for getcovidhelp.in

๐Ÿ“ Table of Contents

๐Ÿง About

The backend was built using Nodejs and deployed on cloudflare workers. It uses cloudflare workers kv as its database.

๐Ÿ Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Create a cloudflare account. Free tier works too.
  • Create a kv namespace. This will be needed later
  • Install Wrangler npm i @cloudflare/wrangler -g
  • Login to your cloudflare account wrangler login

Installing

  • Clone this repo git clone https://github.com/getcovidhelpindia/cloudflare_workers.git
  • Create a wrangler.toml file in the root directory. Then add the corresponding account id and namespace ids in the wrangler.toml.
  • To run it locally, run wrangler dev
  • Try pushing data to your kv using postman API endpoint <LOCALHOST>/addData Sample body
{
    "state":"Bihar",
    "district":"Arwal",
    "type":"0",
    "info":{
        "name":"Jhumri Teliya",
        "contact":"123456789",
        "description":"Oxygen supplier",
        "location":"Arwal"
        },
    "source":"zyx data",
    "createdAt":"2021-04-22T02:24:07.962Z",
    "isApproved":true,
    "isFlagged":false,
    "Usefulness":0,
    "isHidden":false,
    "key":"bihar_arwal_hanwk1bchhxnn6fn"
    }

P.S- Add body as raw text in postman. Form data does not work currently.

๐Ÿš€ Deployment

To deploy to your worker, run wrangler publish

โ›๏ธ Built Using

โœ๏ธ Authors

๐ŸŽ‰ Acknowledgements

cloudflare_workers's People

Contributors

chinmay-kb avatar designrknight avatar

Stargazers

Ritesh Patil avatar

Watchers

 avatar Ritesh Patil avatar

Forkers

riteshsp2000

cloudflare_workers's Issues

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.