Git Product home page Git Product logo

nimbella / demo-projects Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 45.0 2.02 MB

Collection of serverless projects that demonstrate stateful serverless applications including Jamstack applications.

License: Apache License 2.0

JavaScript 76.71% HTML 3.11% CSS 6.00% PHP 0.28% Shell 0.32% SCSS 11.84% Java 0.18% Batchfile 0.10% C# 1.34% Python 0.02% TypeScript 0.10%
faas jamstack serverless stateful stateless

demo-projects's People

Contributors

bhageena avatar dependabot[bot] avatar joshuaauerbachwatson avatar mohanreddymummareddy avatar nancyhild avatar perryiam avatar purplecabbage avatar rabbah avatar satyarohith avatar supers1018 avatar vaibhavdes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

demo-projects's Issues

Very confusing (and wrong) file upload option

In credential.js in the ocr example the options for generating a file upload for put are:

const options = {
    headers: {
      'Content-Type': 'multipart/formdata; charset=UTF-8', // wrong!
      'Access-Control-Allow-Origin': '*',
      'Cross-Domain': true
    }
  };

Actually when you do a PUT you DO NOT HAVE to use multipart form/data, just upload the file as is.
As a result, you have to do ad upload generating a put request that will upload the file as a binary string also specifying Contet-Type "multipart/formdata".... that is not.

I went crazy following the example because I tried to upload with put and multiplart/form-data that is NOT decoded by the put.

I was finally able to perform the upload removing the Content-Type when generating the file upload and then doing a plain put of the file to upload.

add contribution guide

We welcome enhancements to existing command sets and entirely new command sets. We need to put a contribution guide and how to facilitate such contributions.

use env var substitution in election project

For the election project, we should rename the API secret from g_token to GOOGLE_CIVIC_API_TOKEN and use $(GOOGLE_CIVIC_API_TOKEN) in the project.yml because it makes the deploy step/instruction simpler (no .env file to create).

A .env file may still be used. The docs should describe how to use both.

Election demo web build started breaking due to dependency change

The election demo has a lot of open dependencies. It recently entered a state where the actual dependencies that are loaded are inconsistent:

> [email protected] build .../main/config/deployable/election/web
> react-scripts build

Creating an optimized production build...
Failed to compile.

./node_modules/mobx-react-lite/es/utils/assertEnvironment.js
Attempted import error: 'makeObservable' is not exported from 'mobx'.

This breaks the Jenkins deploy job. I am separately recommending that we take the election demo out of the main build until this is fixed.

Move initializer to init time

Several of the API functions read files into memory but do so inside main(). Instead move these to init time and remove the conditional check.

For example, exitpolls

let contents;
function main(args) {
if (!contents) {
contents = fs.readFileSync(__dirname + '/exitpolls.json', 'UTF-8');
}
return { body: JSON.parse(contents) };
}

becomes:

const contents = fs.readFileSync(__dirname + '/exitpolls.json', 'UTF-8');
const body = JSON.parse(contents)

function main(args) {
	return { body }
}

There are several functions like this:

Replace require('nim') calls with updated sdk

using require('nim') gives deprecation message, replace it with the sdk

'nim' is deprecated. Please use '@nimbella/sdk' instead. Visit https://github.com/nimbella/nimbella-sdk-nodejs to learn more.

qr and qr-java should not be combined in one project

Currently qr-java is a package within the qrcode project.

This is not a good illustration of multi-language development because both versions do basically the same thing.

It complicates use of the project under either ecosystem because deploying the project now requires the union of the tools of the two ecosystems. For example, you can't deploy the project as a nodejs developer without having mvn installed (a more Java-centric tool). If this were motivated by a real multi-language use case it would be fine.

I suggest there should be two (top-level) projects qrcode-js and qrcode-java (or something like that).

If this is not done, then, at a minimum, because of this complication, the actual pre-requisites should be documented more clearly as such in the README since typical programmers might not have the union of both.

election API docs should clarify what base url means

When navigating through the election starter APIs, there's a baseURL place holder but it's unclear what this value should be. It's not the domain name for the project deployment but the domain name + /api/ge2020/.

Screen Shot 2020-10-09 at 11 15 32 AM

add auth0 project demo

This will be a useful project to demonstrate how to integrated with an external identity provider.

allow election project to work without civic api key

The election project requires an api key for the civic API. The app should use the Nimbella API if a key is not provided so that it's easier to deploy and get started.

The documentation should be updated accordingly.

page visits deploy broken

> nim project deploy github:nimbella/demo-projects/visits
Deploying project 'github:nimbella/demo-projects/visits'
  to namespace '...'
  on host '...'

Deployed 2 web content items to
...
Deployed actions ('nim action get <actionName> --url' for URL):
  - visits/counter
  - visits/info
Failures:
 โ€บ   Error: While deploying action visits/composer: Action 'visits/composer' not deployed: runtime type could not be determined

likely because we support php 8 now and this project has no project.yml

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.