Commit 8ff9db81 authored by Sander Arntzen's avatar Sander Arntzen
Browse files

Endret på port og path

parent 734ba2d8
export const PORT = 8080; export const PORT = 8081;
export const environment = { export const environment = {
serverURL: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810", serverURL: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810",
dbString: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810" dbString: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "frontend", "name": "frontend",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "http://spiller.ingen.rolle.com/movieapp", "homepage": "http://spiller.ingen.rolle.com/movieappv4",
"dependencies": { "dependencies": {
"@apollo/client": "^3.4.16", "@apollo/client": "^3.4.16",
"@emotion/react": "^11.5.0", "@emotion/react": "^11.5.0",
......
...@@ -15,10 +15,10 @@ import {ApolloClient, ApolloProvider, from, HttpLink, InMemoryCache} from '@apol ...@@ -15,10 +15,10 @@ import {ApolloClient, ApolloProvider, from, HttpLink, InMemoryCache} from '@apol
//A way to build GraphQL endpoint to server //A way to build GraphQL endpoint to server
const link = from([ const link = from([
// Denne koden peker til server på den virtuelle maskinen // Denne koden peker til server på den virtuelle maskinen
//new HttpLink({uri: "http://it2810-36.idi.ntnu.no:8080/graphql"}) //new HttpLink({uri: "http://it2810-36.idi.ntnu.no:8081/graphql"})
// Denne koden peker mot server lokalt på maskinen // Denne koden peker mot server lokalt på maskinen
new HttpLink({uri: "http://localhost:8080/graphql"}) new HttpLink({uri: "http://localhost:8081/graphql"})
]) ])
...@@ -40,8 +40,8 @@ function App() { ...@@ -40,8 +40,8 @@ function App() {
<Header></Header> <Header></Header>
<div className="container"> <div className="container">
<Switch> <Switch>
<Route path="/movieapp/" exact component={Home}/> <Route path="/movieappv4/" exact component={Home}/>
<Route path="/movieapp/movie/:imdbID" component={MovieDetail}/> <Route path="/movieappv4/movie/:imdbID" component={MovieDetail}/>
</Switch> </Switch>
</div> </div>
<Footer/> <Footer/>
......
...@@ -11,7 +11,7 @@ exports[`App component renders page correctly like snapshot 1`] = ` ...@@ -11,7 +11,7 @@ exports[`App component renders page correctly like snapshot 1`] = `
data-testid="header" data-testid="header"
> >
<a <a
href="/movieapp/" href="/movieappv4/"
> >
<div <div
class="logo" class="logo"
......
...@@ -41,12 +41,12 @@ const Header = () => { ...@@ -41,12 +41,12 @@ const Header = () => {
const history = useHistory(); const history = useHistory();
const searchbarFocused = useCallback(() => { const searchbarFocused = useCallback(() => {
window.location.pathname!=='/movieapp/'&&history.push('/movieapp/') window.location.pathname!=='/movieappv4/'&&history.push('/movieappv4/')
}, [history]); }, [history]);
return ( return (
<div data-testid="header" className="header"> <div data-testid="header" className="header">
<Link to="/movieapp/"> <Link to="/movieappv4/">
<div className="logo">Movie App</div> <div className="logo">Movie App</div>
</Link> </Link>
<OutlinedInput <OutlinedInput
......
...@@ -8,8 +8,8 @@ const MovieCard = (dataProps: DBMovie) => { ...@@ -8,8 +8,8 @@ const MovieCard = (dataProps: DBMovie) => {
const history = useHistory(); const history = useHistory();
const [imgSrc, setImgSrc] = useState<string | undefined>(dataProps.posterurl) const [imgSrc, setImgSrc] = useState<string | undefined>(dataProps.posterurl)
return ( return (
<div className="card-item" tabIndex={10} onKeyPress={()=>history.push(`/movieapp/movie/${dataProps.id}`)}> <div className="card-item" tabIndex={10} onKeyPress={()=>history.push(`/movieappv4/movie/${dataProps.id}`)}>
<Link to={`/movieapp/movie/${dataProps.id}`}> <Link to={`/movieappv4/movie/${dataProps.id}`}>
<div className="card-innter"> <div className="card-innter">
<div className="card-top"> <div className="card-top">
<img src={imgSrc ? imgSrc : poster} onError={() => setImgSrc(poster)} alt={`Filmplakat av ${dataProps.title}. Illustrasjon.`}/> <img src={imgSrc ? imgSrc : poster} onError={() => setImgSrc(poster)} alt={`Filmplakat av ${dataProps.title}. Illustrasjon.`}/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment