This file contains hidden or 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
| exports.getPaymentsVue = async (req, res) => { | |
| const getPayees = () => { | |
| return Payee.find({ owner: req.params.userid }) | |
| .cache(0, req.params.userid + "__payees") | |
| .then(payees => { | |
| return payees; | |
| }); | |
| }; |
This file contains hidden or 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
| const app = new Vue({ | |
| el: "#app", | |
| data: { | |
| hasPayments: false, | |
| payments: [], | |
| payees: [], | |
| pageSize: 10, | |
| currentPage: 1, | |
| prevEnable: false, | |
| nextEnable: true, |
This file contains hidden or 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
| module.exports = { | |
| /* | |
| ** Router config | |
| */ | |
| router: { | |
| middleware: "check-auth" | |
| }, | |
| /* | |
| ** Headers of the page | |
| */ |
This file contains hidden or 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
| const express = require("express"); | |
| const bodyParser = require("body-parser"); | |
| const mongoose = require("mongoose"); | |
| const cors = require("cors"); | |
| const apiController = require("./controllers/api"); | |
| // Create express instnace | |
| const app = express(); |
This file contains hidden or 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
| const Payee = require("../models/Payee"); | |
| const Payments = require("../models/Payment"); | |
| exports.getPayees = async (req, res) => { | |
| return Payee.find({ owner: req.params.userid }) | |
| .sort({ day: 1 }) | |
| .then(payees => { | |
| res.json(payees); | |
| }); | |
| }; |
This file contains hidden or 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
| version: '2' | |
| services: | |
| dev-nginx: | |
| build: | |
| context: ./.docker/dev/nginx | |
| container_name: dev-nginx | |
| links: | |
| - dev-node | |
| ports: | |
| - "80:80" |
This file contains hidden or 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
| version: '2' | |
| services: | |
| fullstack-nginx: | |
| build: | |
| context: ./.docker/prod/nginx | |
| container_name: fullstack-nginx | |
| links: | |
| - fullstack-node | |
| ports: | |
| - "80:80" |
This file contains hidden or 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
| upstream backend { | |
| server dev-node:3000; | |
| } | |
| upstream webpack { | |
| server dev-webpack:8080; | |
| } | |
| server { | |
| listen 80; |
This file contains hidden or 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
| upstream backend { | |
| server fullstack-node:3000; | |
| } | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| #access_log /var/log/nginx/host.access.log main; |
This file contains hidden or 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
Show hidden characters
| { | |
| "env": { | |
| "node": true, | |
| "es6": true | |
| }, | |
| "ecmaFeatures": { | |
| "arrowFunctions": true, | |
| "blockBindings": true, | |
| "classes": true, | |
| "defaultParameters": true, |