This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import './App.css'; | |
| import { Link, browserHistory, IndexRoute, BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
| import Home from './Home' | |
| import AddDetails from './AddDetails' | |
| function App() { | |
| return ( | |
| <div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Navbar from './Navbar' | |
| import Main from './Main' | |
| import { Link, browserHistory, IndexRoute, BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
| function Home() { | |
| return ( | |
| <div className="App"> | |
| <Router browserHistory> | |
| <Navbar /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from 'react'; | |
| import axios from 'axios' | |
| function Main() { | |
| const [data,setdata] = useState([]) | |
| useEffect(() => { | |
| async function fetchData() { | |
| const res = await axios.get("https://user-details-mern.herokuapp.com/details") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import axios from 'axios' | |
| import { Link, browserHistory, IndexRoute, BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
| function AddDetails() { | |
| const handleSubmit = (e) => { | |
| e.preventDefault(); | |
| var number = e.target.tel.value | |
| if (number.length == 10) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .root { | |
| margin: 0px; | |
| padding: 0px; | |
| } | |
| .App { | |
| width: 100%; | |
| -webkit-box-align: center; | |
| -ms-flex-align: center; | |
| align-items: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import * | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def index(): | |
| return "<h1>Welcome to the tutorial of Flask CRUD Operations</h1>" | |
| if __name__ == "__main__": | |
| app.run(debug=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pymysql as Mysql | |
| mydb = Mysql.connect(host="localhost",user="root",password="",database="crudflask") | |
| mycursor = mydb.cursor() | |
| mycursor.execute("CREATE TABLE userinfo(Id INT NOT NULL AUTO_INCREMENT,Name CHAR(20),EmailId Char(30),Gender Char(7),Age CHAR(10), ClgName CHAR(40),PRIMARY KEY (Id))") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>CRUD-Flask</title> | |
| <style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h1>Welcome to AWS cloud</h1> | |
| <h2>This is testing page</h2> | |
| On how to deploy web application in aws cloud. Follow the link given below | |
| </br> | |
| </br> |