Archived
Merge branch 'master' of https://github.com/makoteq/eco-hack
This commit is contained in:
commit
bed77f0c03
6 files changed
+28
-2254
No files matched your search
+6
-5
@@ -1,6 +1,7 @@
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
const port = process.env.PORT || 3000
|
||||
const { MONGO_URI } = require("./config");
|
||||
const mongoose = require("mongoose");
|
||||
const events = require("./models/events");
|
||||
@@ -23,5 +24,5 @@ app.get("/api/getEvents", async (req, res) => {
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Example app listening at http://localhost:${port}`);
|
||||
});
|
||||
console.log(`Example app listening at http://localhost:${port}`)
|
||||
})
|
||||
@@ -2,26 +2,10 @@ const mongoose = require("mongoose");
|
||||
const schema = mongoose.Schema;
|
||||
|
||||
const eventSchema = new schema({
|
||||
name: {
|
||||
mess: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
date: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
time: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
lat: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
lon: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("events", eventSchema);
|
||||
Generated
+10
-2227
File diff suppressed because it is too large.
Load diff
+7
-4
@@ -2,15 +2,18 @@ import { BrowserRouter as Router, Switch, Route /*Link*/ } from "react-router-do
|
||||
import { Home } from "./pages/Home";
|
||||
import { About } from "./pages/About";
|
||||
import { Users } from "./pages/Users";
|
||||
import { NotFound } from "./pages/NotFound";
|
||||
import Logo from "./components/Logo";
|
||||
|
||||
export const App = () => {
|
||||
return (
|
||||
<Router>
|
||||
<Logo/>
|
||||
<Logo />
|
||||
<Switch>
|
||||
<Route path="/about" component={About} />
|
||||
<Route path="/users" component={Users} />
|
||||
<Route path="/" component={Home} />
|
||||
<Route exact path="/about" component={About} />
|
||||
<Route exact path="/users" component={Users} />
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route component={NotFound} />
|
||||
</Switch>
|
||||
</Router>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export const NotFound = () => {
|
||||
return <h1>Podana strona nie została odnaleziona</h1>;
|
||||
};
|
||||
Whitespace-only changes.
Reference in new issue
Block a user