Commit 50f26422 authored by Hedda's avatar Hedda
Browse files

edit so that server from project3 can run also

parent 294ba490
......@@ -3,9 +3,9 @@ const express = require("express");
var cors = require("cors");
const bodyParser = require("body-parser");
const logger = require("morgan");
const router = require("./routers/api");
const router = require("./api");
const API_PORT = 3001;
const API_PORT = 3002;
const app = express();
app.use(cors());
......
......@@ -4,7 +4,7 @@ import { AsyncStorage } from "react-native";
// Checks what the input is, and returns the correct fetch-URL
// based on the input.
const createURL = (input, sorting) => {
const API_URL = "http://it2810-10.idi.ntnu.no:3001/api/";
const API_URL = "http://it2810-10.idi.ntnu.no:3002/api/";
if (input == "") {
return API_URL + "getData/" + sorting;
}
......@@ -33,7 +33,7 @@ export const GetData = async (input, sorting) => {
// Update function for when a card is clicked
// Updates the populatiry of that destination
export const UpdatePopulatiry = (destinationID, newPopularity) => {
axios.post("http://it2810-10.idi.ntnu.no:3001/api/updateData", {
axios.post("http://it2810-10.idi.ntnu.no:3002/api/updateData", {
id: destinationID,
update: { popularity: newPopularity }
});
......
......@@ -7,7 +7,7 @@ const initState = [
{
index: 2,
menuName: "Continent",
options: ["All", "Africa", "America", "Asia", "Europe", "Osceania"]
options: ["All", "Africa", "America", "Asia", "Europe", "Oceania"]
}
];
......
Markdown is supported
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