-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5363db6
commit 695360d
Showing
10 changed files
with
3,567 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
.cache |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const express = require('express'); | ||
const exphbs = require('express-handlebars'); | ||
|
||
// Database | ||
const db = require('./config/database'); | ||
|
||
// Test DB | ||
db.authenticate() | ||
.then(() => { | ||
console.log('Connection has been established successfully.'); | ||
}) | ||
.catch(err => { | ||
console.error('Unable to connect to the database:', err); | ||
}); | ||
|
||
const app = express(); | ||
|
||
app.get('/', (req, res) => res.send('INDEX')); | ||
|
||
// Myment routes | ||
app.use('/myment', require('./routes/myment')); | ||
|
||
const PORT = process.env.PORT || 5000; | ||
|
||
app.listen(PORT, console.log(`Server started on port ${PORT}`)); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Sequelize = require('sequelize'); | ||
|
||
module.exports = new Sequelize('myment', 'root', '010495a', { | ||
host: 'localhost', | ||
dialect: 'mariadb', | ||
dialectOptions: { | ||
timezone: 'Etc/GMT-3', // Verify THIS! IMPORTANT! | ||
}, | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) | ||
-- | ||
-- Host: localhost Database: myment | ||
-- ------------------------------------------------------ | ||
-- Server version 10.1.38-MariaDB-0+deb9u1 | ||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8mb4 */; | ||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | ||
/*!40103 SET TIME_ZONE='+00:00' */; | ||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | ||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | ||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | ||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | ||
|
||
-- | ||
-- Table structure for table `add` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `add`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `add` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`locality` varchar(255) DEFAULT NULL, | ||
`tags` varchar(255) DEFAULT NULL, | ||
`description` varchar(255) DEFAULT NULL, | ||
`category` varchar(255) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `add` | ||
-- | ||
|
||
LOCK TABLES `add` WRITE; | ||
/*!40000 ALTER TABLE `add` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `add` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `gen_custom` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `gen_custom`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `gen_custom` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`location` varchar(255) DEFAULT NULL, | ||
`category` varchar(255) DEFAULT NULL, | ||
`items` varchar(255) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `gen_custom` | ||
-- | ||
|
||
LOCK TABLES `gen_custom` WRITE; | ||
/*!40000 ALTER TABLE `gen_custom` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `gen_custom` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `gen_custom_category` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `gen_custom_category`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `gen_custom_category` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`category` varchar(255) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `gen_custom_category` | ||
-- | ||
|
||
LOCK TABLES `gen_custom_category` WRITE; | ||
/*!40000 ALTER TABLE `gen_custom_category` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `gen_custom_category` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `gen_custom_items` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `gen_custom_items`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `gen_custom_items` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`tags` varchar(255) DEFAULT NULL, | ||
`item_name` varchar(255) DEFAULT NULL, | ||
`location` varchar(255) DEFAULT NULL, | ||
`description` varchar(255) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `gen_custom_items` | ||
-- | ||
|
||
LOCK TABLES `gen_custom_items` WRITE; | ||
/*!40000 ALTER TABLE `gen_custom_items` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `gen_custom_items` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `log_in` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `log_in`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `log_in` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`username` varchar(255) DEFAULT NULL, | ||
`password` varchar(255) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `log_in` | ||
-- | ||
|
||
LOCK TABLES `log_in` WRITE; | ||
/*!40000 ALTER TABLE `log_in` DISABLE KEYS */; | ||
INSERT INTO `log_in` VALUES (1,NULL,NULL); | ||
/*!40000 ALTER TABLE `log_in` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `profile` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `profile`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `profile` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`username` varchar(255) DEFAULT NULL, | ||
`profile_photo` mediumtext, | ||
`first_name` varchar(255) DEFAULT NULL, | ||
`profile_info` varchar(255) DEFAULT NULL, | ||
`ranking_position` int(11) DEFAULT NULL, | ||
`ranking_points` int(11) DEFAULT NULL, | ||
`number_moments` int(11) DEFAULT NULL, | ||
`moment_points` int(11) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `profile` | ||
-- | ||
|
||
LOCK TABLES `profile` WRITE; | ||
/*!40000 ALTER TABLE `profile` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `profile` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `ranking` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `ranking`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `ranking` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`username` varchar(255) DEFAULT NULL, | ||
`points` int(11) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `ranking` | ||
-- | ||
|
||
LOCK TABLES `ranking` WRITE; | ||
/*!40000 ALTER TABLE `ranking` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `ranking` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Table structure for table `sign_up` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `sign_up`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `sign_up` ( | ||
`Id` int(11) DEFAULT NULL, | ||
`first_name` varchar(255) DEFAULT NULL, | ||
`last_name` varchar(255) DEFAULT NULL, | ||
`username` varchar(255) DEFAULT NULL, | ||
`password` varchar(255) DEFAULT NULL, | ||
`email` varchar(255) DEFAULT NULL, | ||
`location` varchar(255) DEFAULT NULL, | ||
`travels` varchar(255) DEFAULT NULL, | ||
`age` int(11) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `sign_up` | ||
-- | ||
|
||
LOCK TABLES `sign_up` WRITE; | ||
/*!40000 ALTER TABLE `sign_up` DISABLE KEYS */; | ||
INSERT INTO `sign_up` VALUES (1,'Armando','de Canha','armandodc','010495','[email protected]','Santa Cruz de Tenerife',NULL,24); | ||
/*!40000 ALTER TABLE `sign_up` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | ||
|
||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | ||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | ||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | ||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | ||
|
||
-- Dump completed on 2019-07-22 16:36:06 |
Oops, something went wrong.