Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week13 #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Week-13/Assignment13.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

## Week 13
###Assignment 1 Weather app

●Create a backend service in NodeJs.
●Design the architecture of your service.
●Understand what all Design Patterns you are gonna use in the service.
●Review above 2 points by your mentor
●Start Creating following Api's○Data of Multiple cities
■Api which returns weather data of multiple cities .
■Api also filters the result by city name or city code.
■Api should return the data in pagination.○Detailed Forecast for the next X days.
■X days should be decided by the user.
■Data should be very detailed.○Filter the data by any particular city, any particular date , anyparticular moment○Current weather conditions of any particular city
.●For Weather free api , please visit any of below free services○https://openweathermap.org/api
■Api Docs -https://openweathermap.org/api
■How to use -https://openweathermap.org/appid○https://www.weatherapi.com/
■Api Docs -https://www.weatherapi.com/docs/
■How to use -https://www.weatherapi.com/docs/
Guidelines:
●Before creating an api's review architect of your service and design pattern byyour Mentor.
●Push all your code in a separate Github repo.
●Don't push all your code in a single go.
●Don't push your code in the master branch. Create a separate branch for yourcode.
●Push your code every part wise.
●Get reviewed all your code by your mentor.
●After review, get your code merged by your mentor.


![My image](./Screenshots/Screenshot.PNG)

![My image](./Screenshots/Screenshot1.PNG)
Binary file added Week-13/Assignment13.1/Screenshots/Screenshot.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Week-13/Assignment13.1/weather-app-backend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PORT = 3001
API_KEY=a85dd74d514b4bf69d0133758220708
1 change: 1 addition & 0 deletions Week-13/Assignment13.1/weather-app-backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
13 changes: 13 additions & 0 deletions Week-13/Assignment13.1/weather-app-backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const express = require("express");
const cors=require('cors')
const routes=require('./routes/routes')
require("dotenv").config();
const app = express();
const PORT = process.env.PORT;

app.use(cors())
app.use(express.json())
app.use('/',routes)
app.listen(PORT, () => {
console.log(`server running at 127.0.0.1:${PORT}`);
});
6 changes: 6 additions & 0 deletions Week-13/Assignment13.1/weather-app-backend/models/model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const mongoose = require("mongoose");
const dataSchema = new mongoose.Schema({
name: { required: true, type: String },
age: { required: true, type: Number }
});
module.exports = mongoose.model("Data", dataSchema);
Loading