Skip to content

henlegay/Dinder-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image Dinder

Dependency Status devDependencies Status Build Status Join the chat at https://gitter.im/sahat/hackathon-starter

Live Demo: https://hackathon-starter.walcony.com

Jump to What's new?

A boilerplate for Node.js web applications.

If you have attended any hackathons in the past, then you know how much time it takes to get a project started: decide on what to build, pick a programming language, pick a web framework, pick a CSS framework. A while later, you might have an initial project up on GitHub, and only then can other team members start contributing. Or how about doing something as simple as Sign in with Facebook authentication? You can spend hours on it if you are not familiar with how OAuth 2.0 works.

When I started this project, my primary focus was on simplicity and ease of use. I also tried to make it as generic and reusable as possible to cover most use cases of hackathon web apps, without being too specific. In the worst case, you can use this as a learning guide for your projects, if for example you are only interested in Sign in with Google authentication and nothing else.

IBM Bluemix Cloud Platform

NOTE At this point it appears that Bluemix's free tier to host NodeJS apps is limited to 30 days. If you are looking for a free tier service to host your app, Heroku might be a better choice at this point

  1. Create a Bluemix Account

    Sign up for Bluemix, or use an existing account.

  2. Download and install the Cloud Foundry CLI to push your applications to Bluemix.

  3. Create a manifest.yml file in the root of your application.

applications:
- name:      <your-app-name>
  host:      <your-app-host>
  memory:    128M
  services:
  - myMongo-db-name

The host you use will determinate your application URL initially, e.g. <host>.mybluemix.net. The service name 'myMongo-db-name' is a declaration of your MongoDB service. If you are using other services like Watson for example, then you would declare them the same way.

  1. Connect and login to Bluemix via the Cloud-foundry CLI
$ cf login -a https://api.ng.bluemix.net
  1. Create a MongoDB service
$ cf create-service mongodb 100 [your-service-name]

Note: this is a free and experiment verion of MongoDB instance. Use the MongoDB by Compose instance for production applications:

$ cf create-service compose-for-mongodb Standard [your-service-name]'
  1. Push the application

    $ cf push
    
    $ cf env <your-app-name >
    (To view the *environment variables* created for your application)
    
    

Done, now go to the staging domain (<host>.mybluemix.net) and see your app running.

Cloud Foundry Commands More Bluemix samples Simple ToDo app in a programming language of your choice

IBM Watson

Be sure to check out the full list of Watson services to forwarder enhance your application functionality with a little effort. Watson services are easy to get going; it is simply a RESTful API call. Here is an example of a Watson Toner Analyzer to understand the emotional context of a piece of text that you send to Watson.

Watson catalog of services

Conversation - Quickly build and deploy chatbots and virtual agents across a variety of channels, including mobile devices, messaging platforms, and even robots.

Discovery - Unlock hidden value in data to find answers, monitor trends and surface patterns with the world’s most advanced cloud-native insight engine.

Language Translator - Translate text from one language to another.

Natural Language Classifier - Interpret and classify natural language with confidence.

Natural Language Understanding - Analyze text to extract meta-data from content such as concepts, entities, keywords and more.

Personality Insights - Predict personality characteristics, needs and values through written text.

Speech to Text - Convert audio and voice into written text for quick understanding of content.

Text to Speech - Convert written text into natural sounding audio in a variety of languages and voices.

Tone Analyzer - Understand emotions, social tendencies and perceived writing style.

Visual Recognition - Tag, classify and search visual content using machine learning.

Click here for live demos of each Watson service.


Google Cloud Platform

  • Download and install Node.js

  • Select or create a Google Cloud Platform Console project

  • Enable billing for your project (there's a $300 free trial)

  • Install and initialize the Google Cloud SDK

  • Create an app.yaml file at the root of your hackathon-starter folder with the following contents:

    runtime: nodejs
    env: flex
    manual_scaling:
      instances: 1
  • Make sure you've set MONGODB_URI in .env.example

  • Run the following command to deploy the hackathon-starter app:

    gcloud app deploy
  • Monitor your deployed app in the Cloud Console

  • View the logs for your app in the Cloud Console

Production

If you are starting with this boilerplate to build an application for prod deployment, or if after your hackathon you would like to get your project hardened for production use, see prod-checklist.md.

Changelog

You can find the changelog for the project in: CHANGELOG.md

Contributing

If something is unclear, confusing, or needs to be refactored, please let me know. Pull requests are always welcome, but due to the opinionated nature of this project, I cannot accept every pull request. Please open an issue before submitting a pull request. This project uses Airbnb JavaScript Style Guide with a few minor exceptions. If you are submitting a pull request that involves Pug templates, please make sure you are using spaces, not tabs.

License

The MIT License (MIT)

Copyright (c) 2014-2022 Sahat Yalkabov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Dinner Tinder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published