Skip to content
Snippets Groups Projects
Commit 00b7dbc2 authored by ems19's avatar ems19
Browse files

[FIX] Unused and wrong files removed

parent 9e6cfd16
No related branches found
No related tags found
2 merge requests!449Homologa,!444dev -> hom
......@@ -28,3 +28,7 @@ package-lock.json
Dockerfile
DockerfileAntigo
src/libs/db/postgres.js
docker-compose.yml
entrypoint.sh
gulpfile.template.js
services:
simcaq-node:
container_name: simcaq-node
build: .
ports:
- '3000:3000'
develop:
watch:
- action: sync
path: .
target: /API
#!/bin/bash
echo "Starting simcaq-node"
gulp watch &> /dev/null &
cd build
NODE_ENV=production gulp run
......@@ -43,12 +43,12 @@ gulp.task('compile', ['lint'], () => {
gulp.src('src/**/*.js')
.pipe(cache.filter()) // cache source files
.pipe(babel()) // compile only modified files
.pipe(cache.cache()) // cache compiled files
// .pipe(cache.cache()) // cache compiled files
.pipe(gulp.dest('build')); // move compiled files to build directory
});
gulp.task('build', ['compile'], () => {
var filesToCopy = [ 'config.json', 'package.json', '.eslintignore', '.eslintrc.json' ];
var filesToCopy = [ 'config.json', 'package.json' ];
// copy configuration file to build directory
gulp.src(filesToCopy)
.pipe(gulp.dest('build'));
......@@ -93,16 +93,25 @@ gulp.task('test', ['pre-test'], () => {
});
});
gulp.task('watch', () => {
gulp.task('watch', ['compile'], () => {
console.log('Watching source directory for changes');
return gulp.watch('src/**/*.js').on('change', () => {
gulp.watch('src/**/*.js').on('change', () => {
console.log('Recompiling source');
gulp.start('compile');
console.log('Source recompilation done');
});
});
gulp.task('default', () => {
console.log("Não execuatar apenas gulp, execute da forma:");
console.log("\t\tgulp <task>");
gulp.task('run', () => {
process.chdir('build');
nodemon({
script: 'server.js',
tasks: ['watch'],
ignore: ["test/test.js", "gulpfile.babel.js"],
ext: 'js html json',
env: { 'NODE_ENV': process.env.NODE_ENV }
});
});
gulp.task('default', ['run']);
const gulp = require('gulp');
const nodemon = require('gulp-nodemon');
gulp.task('run', () => {
// process.chdir('build');
nodemon({
script: 'server.js',
// tasks: ['watch'],
ignore: ["test/test.js", "gulpfile.babel.js"],
ext: 'js html json',
env: { 'NODE_ENV': process.env.NODE_ENV }
});
});
gulp.task('default', () => {
console.log("Não execuatar apenas gulp, execute da forma:");
console.log("\t\tgulp <task>");
});
/*
Copyright (C) 2024 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
const express = require('express');
const SchoolProfessorsApp = express.Router();
const libs = `${process.cwd()}/libs`;
const squel = require('squel');
const query = require(`${libs}/middlewares/query`).query;
const response = require(`${libs}/middlewares/response`);
const ReqQueryFields = require(`${libs}/middlewares/reqQueryFields`);
const id2str = require(`${libs}/middlewares/id2str`);
const config = require(`${libs}/config`);
const cache = require('apicache').options({ debug: config.debug, statusCodes: {include: [200]} }).middleware;
let rqf = new ReqQueryFields();
SchoolProfessorsApp.use(cache('15 day'));
SchoolProfessorsApp.get('/', (req, res, next) => {
req.sql.from('pnad_novo')
.field('sum(num_doc_ed_basica)', 'escola_agregada')
next();
}, query, response('years'));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment