Skip to content

marzeelabs/cordis-serverless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordis-serverless

Provides a clean and simple REST interface on top of EU Cordis data.

Usage

  • GET projects: returns the first 100 projects from the Cordis database.

About

This API uses the serverless framework on Amazon AWS. What is a serverless architecture?

Installation

Install serverless framework locally

npm install -g serverless

Connect to your Amazon AWS account, and then deploy

serverless deploy

AWS setup

DynamoDB streams aren't managed by Serverless, so these have been set up through the UI.

Endpoints

Example querying graphQL

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ project { rcn, title } }"}' https://5e5qfaxb1c.execute-api.eu-west-1.amazonaws.com/dev/graphql

Test locally

You can invoke functions locally, like

serverless invoke local -f getProjects

Debug function invokes like

serverless logs -f getProjects

Count number of items in a DynamoDB table

aws dynamodb scan --table-name=cordis_projects --select "COUNT"

License

MIT © Marzee Labs

About

A serverless API for EU Cordis data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages