https://github.com/alejandromumo/gochallenge

GO Challenge - Weather API

https://github.com/alejandromumo/gochallenge

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

GO Challenge - Weather API

Basic Info
  • Host: GitHub
  • Owner: alejandromumo
  • Language: JavaScript
  • Default Branch: master
  • Size: 4.01 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 6 years ago · Last pushed almost 6 years ago
Metadata Files
Readme

README.md

goChallenge

GO Challenge - Weather API

Simple application to retrieve weather data from the public API Open Weather Map.

The server-side of this application is implemented using node.js, more specifically express.js. The front-end is implemented using templates, namely nunjucks and some vanilla JS, jQuery and ajax.

Install

Install the dependencies by executing npm install

Setup

This application uses environment variables to configure how the application will run.

Environment Variables

You must create a .env file and place it under the /config directory. A .env_sample is provided to demonstrate the structure of the file.

  • API_KEY - the private API key to be used within the application to communicate with the public API.
  • NODE_ENV- the run environment. Either production or dev. It can also be left in blank, and the application will use the default configurations.

NOTE : you must place a valid API key from the Open Weather Map. You can get one following the steps detailed in here.

Configurations

Additionally, the application also also uses the config library to set up the configuration parameters for different run environments. The configuration files are also under the /config directory. Each environment's configurations are detailed in the /config/*.json files (i.e. for dev, it will use the configurations specified in the dev.json file)

Run

To run the application, simply execute npm start and access the application in your browser:

  • For dev: https://localhost:8080/
  • For production: https://localhost:9090/
  • Otherwise: https://localhost:3030/

Note that you can configure the port by editing the desired configuration file. If you do this, you should access the application in the port that you specified.

If, by any reason, the configuration through these files fail, the default port is 9090.

The application uses HTTPS. This requires a SSL certificate that, in turn, requires a private RSA key to sign it. For the purpose of this demonstration, both the certificate and the key are available in the server-side under the directory /bin.

Tutorial

Even though the application is simple, there are a few notes that should be specified.

  • In order to retrieve weather data, at least three cities must be added.
  • Cities have a cooldown effect, i.e., each request for the same city can only be performed after 10 minutes of the previous request. This is recommended by the Open Weather Map API (Section "Tips on how to use API effectively").

Owner

  • Name: Manuel Alejandro
  • Login: alejandromumo
  • Kind: user
  • Location: Geneva, Switzerland
  • Company: CERN

Computer Engineer | CERN Open Science Repositories | @inveniosoftware @zenodo

GitHub Events

Total
Last Year

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 9
  • Total Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Manuel Alejandro a****o 9

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels