Sign inSign up

alexagency/rocket_serverless

By alexagency

Updated over 7 years ago

Image
0

2.2K

alexagency/rocket_serverless repository overview

Serverless

This is Functions as a Service (FaaS) serverless container which is used as a temprorary server-side application while the Rocker Server is main server-side logic and still been writting by the application developer unlike main architecture, it’s run in stateless compute container.

image

Build with Docker
docker-compose build
Run with Docker
docker-compose up
Browse
http://localhost:4000/graphql
Query example
{ 
  # Get user's first name with id equal 200:
  user(id: 200) {
    firstName  
  }
  # Get title and all members of event with id equal 100:
  event(id: 100) {
    title
    members {
      firstName
    }
  }
  # Get all users id and first name:
  users {
    id
    firstName
  }
  # Get all events id and title:
  events {
    id
    title
  }  
}
Mutation example
mutation {
  # Create new user and get his id and email:
  createUser(email: "[email protected]") {
    id
    email
  }
  # Create new event and get its id and title:
  createEvent(title: "Data Science Course") {
    id
    title
  }
  # Remove user with id equal 200:
  deleteUser(id: 200)
  # Remove event with id equal 300:
  deleteEvent(id: 300)
}

Development

Resolve dependencies
yarn
Run with Yarn
yarn start
Watch with Yarn
yarn watch
Debug with VSCode
yarn debug

Start Debugging in VScode

Tag summary

Content type

Image

Digest

Size

369.6 MB

Last updated

over 7 years ago

docker pull alexagency/rocket_serverless