Skip to content

Commit

Permalink
Added the basic files
Browse files Browse the repository at this point in the history
  • Loading branch information
armandodecanha committed Jul 26, 2019
1 parent 5363db6 commit 695360d
Show file tree
Hide file tree
Showing 10 changed files with 3,567 additions and 27 deletions.
46 changes: 23 additions & 23 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repository:
name: myment-back
description: Myment Travel app BackEnd
name: myment_back
description: Myment Travel Web App back-end
homepage:
topics:
private: true
Expand All @@ -11,87 +11,87 @@ repository:
allow_squash_merge: true
allow_merge_commit: true
labels:
- name: "Status: Blocked"
- name: 'Status: Blocked'
color: e2002a
description: An issued blocked

- name: "Status: On Hold"
- name: 'Status: On Hold'
color: c0d2da
description: the tasks that we will not do until further notice

- name: "Type: Bug"
- name: 'Type: Bug'
color: CC0000
description: An issue with the system bug

- name: "Type: Enhancement"
- name: 'Type: Enhancement'
color: 83b8e8
description: An issue to enhancement the system ⚙️.

- name: "Type: Maintenance"
- name: 'Type: Maintenance'
color: fcc73a
description: An issue to maintenance the system.

- name: "Type: Analysis"
- name: 'Type: Analysis'
color: cd237b
description: An issue to maintenance the system.

- name: "Type: Feature"
- name: 'Type: Feature'
color: 336699
description: New functionality.

- name: "Type: Discussion"
- name: 'Type: Discussion'
color: ddd8cc
decription: we haven't reached a consensus there, maybe you can contribute?

- name: "Type: Epic"
- name: 'Type: Epic'
color: 74b566
description: is an issue that can lead to several PRs and should be broken down into atomic issues before it gets implemented.

- name: "Priority: Critical"
- name: 'Priority: Critical'
color: e2002a
description: Critical priority tasks that should be done ASAP

- name: "Priority: High"
- name: 'Priority: High'
color: ec5b30
description: High priority tasks that can be done when there's no critical priority tasks

- name: "Priority: Medium"
- name: 'Priority: Medium'
color: fcc73a
description: medium priority tasks that can be done when there's no High priority tasks

- name: "Priority: Low"
- name: 'Priority: Low'
color: 009922
description: low priority tasks that can be done when there's no medium priority tasks

- name: "Estimate: 1h"
- name: 'Estimate: 1h'
color: bfe5c1
description: Estimate 1hour

- name: "Estimate: 2h"
- name: 'Estimate: 2h'
color: bfe5c1
description: Estimate 2 hours

- name: "Estimate: 3h"
- name: 'Estimate: 3h'
color: bfe5c1
description: Estimate 3 hours

- name: "Estimate: 5h"
- name: 'Estimate: 5h'
color: bfe5c1
description: Estimate 5 hours

- name: "Estimate: 8h"
- name: 'Estimate: 8h'
color: bfe5c1
description: Estimate 8 hours

- name: "Estimate: 13h"
- name: 'Estimate: 13h'
color: bfe5c1
description: Estimate 13 hours

- name: "Estimate: 20h"
- name: 'Estimate: 20h'
color: bfe5c1
description: Estimate 20 hours

- name: "Estimate: 40h"
- name: 'Estimate: 40h'
color: bfe5c1
description: Estimate 40 hours

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.cache
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
25 changes: 25 additions & 0 deletions app.js
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}`));
9 changes: 9 additions & 0 deletions config/database.js
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!
},
});
229 changes: 229 additions & 0 deletions db1-myment-backup-2019-07-22.sql
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
Loading

0 comments on commit 695360d

Please sign in to comment.