Coder Social home page Coder Social logo

daylight's Introduction

Daylight

Shows the current sunset and sunrise times for the selected location.

Visit https://day-light.netlify.com/ to view the app.

What is your motivation for creating this project?

The changing length of days and nights depends on the location and season of the year. It would be nice to know how many hours of daylight we have at a certain location.

How will users interact with your web site?

The user enters the city or country name in the search field and receives the current sunset and sunrise times for that location

What 3rd Party API(s) will you integrate with?

  • GeoNames
    • To discover the latitude and longitude of the location
    • To get a sunrise & sunset times from long/lat.

Tech Stack

Will you try to implement any stretch features?

  • I'll use Webpack to bundle modules.

What will be your process?

  • I will submit commit when a feature is added, or a task is accomplished.
  • I'll test the website manually, and I'll use Jest framework to write a unit tests.
  • I will use wireframe.cc to design a layout.
  • It will be deployed on Netlify

How to run this project on the local machine?

Prerequisites

You must have Node.js installed before running this project locally. Also, you have to sign up for GeoNames free account, to use their web API.

Installation

  1. Open a terminal and clone the project.
git clone https://github.com/mariusjagminas/Daylight.git
  1. Navigate into Daylight directory.
cd Daylight
  1. Install all dependencies.
npm install
  1. Create .env file in the project's root directory.

  2. Create the USER variable in the .env file. The variable value must be your GeoNames username.

 USER=your_user_name_on_GeoNames
  1. Start webpack development server
npm start

The browser should open automatically. If not, open your browser and visit http://localhost:8080/ to view the application.

Production

Open a terminal and run.

npm run build

You will find the files in the dist. folder

Testing

This app uses Jest for a unit testing. To run tests, open a terminal and type:

npm test

or

npm run watch

to run tests in a watch mode.

Acknowledgements

Thanks to klemenjarc for the feature suggestion. The feature has been implemented in the project. In addition, I've created a basic API endpoint for anyone who wants to use it: same-length-of-the-day-api

daylight's People

Contributors

mariusjagminas avatar dependabot[bot] avatar

Stargazers

Kaung Khant Zaw avatar

Watchers

James Cloos avatar  avatar

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.