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
{ | |
"extends": ["airbnb-base"], | |
"env": { | |
"node": true, | |
"es6": true, | |
"browser": true | |
}, | |
"rules": { | |
"no-console": "off" | |
} |
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, { Component } from 'react'; | |
import { BrowserRouter as Router, Route, Switch} from "react-router-dom"; | |
import './App.css'; | |
import Register from './component/register'; | |
import Login from './component/login'; | |
import Navbar from './component/navbar'; | |
class App extends Component { | |
render() { |
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, { Component } from 'react'; | |
import fire from '../fire'; | |
import ShowProfile from './showprofile'; | |
export default class Register extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
email : '', |
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, { Component } from 'react'; | |
export default class ShowProfile extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
...props | |
} | |
console.log('state', this.state) | |
} |
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, { Component } from 'react'; | |
import fire from '../fire'; | |
import { Link } from "react-router-dom"; | |
import ShowProfile from './showprofile'; | |
export default class Login extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
email : '', |
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
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"module": "commonjs", | |
"baseUrl": ".", | |
"outDir": "dist", | |
"jsx": "react", | |
"moduleResolution": "node", | |
"allowJs": true, | |
"paths": { |
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
var express = require('express'); | |
const next = require('next'); | |
const isDev = process.env.NODE_ENV !== 'production'; | |
const app = next({ isDev }); | |
const handle = app.getRequestHandler(); | |
const server = express(); | |
app |
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 { Request, Response } from 'express'; | |
const hi = (req: Request, res: Response) => { | |
res.json({ hi: 'hi' }); | |
}; | |
module.exports = hi; |
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 * as hi from './controllers/hi'; | |
var express = require('express'); | |
const next = require('next'); | |
const isDev = process.env.NODE_ENV !== 'production'; | |
const app = next({ isDev }); | |
const handle = app.getRequestHandler(); | |
const server = express(); |