Skip to content

Instantly share code, notes, and snippets.

View Paretkf's full-sized avatar
🏠
Working from home

Rachata Paretkf

🏠
Working from home
View GitHub Profile
language: node_js
node_js:
- "6.11"
branches:
only:
- master # auto build and deploy in only master branch
install:
- npm install -g firebase-tools # install firebase-cli
- yarn
MONGO_USER=superAdmin
MONGO_PASSWORD=superPassword
MONGO_HOST=localhost:27017
PORT=7777
require('dotenv').config()
const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const mongoose = require('mongoose')
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
mongoose.connect(`mongodb://${process.env.MONGO_USER}:${process.env.MONGO_PASSWORD}@${process.env.MONGO_HOST}/Todo`, { useMongoClient: true })
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const Todo = new Schema({
description: String,
done: Boolean
})
module.exports = mongoose.model('Todo', Todo)
require('dotenv').config()
const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const mongoose = require('mongoose')
const todos = require('./app/routers/todos')
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
var express = require('express')
const Todo = require('../models/todo')
const app = express()
app.get('/todos', (request, response) => {
Todo.find().then(todos => {
response.json({todos})
})
})
app.post('/post', (request, response) => {
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const User = new Schema({
email: String,
password: String
})
module.exports = mongoose.model('User', User)
var express = require('express')
const Todo = require('../models/todo')
const User = require('../models/user')
var session = require('express-session')
const app = express()
app.use(session({
secret: 'keyboard cat',
resave: false,
saveUninitialized: true
# Copyright 2001-2018 Sourcefire, Inc. All Rights Reserved.
#
# This file contains (i) proprietary rules that were created, tested and certified by
# Sourcefire, Inc. (the "VRT Certified Rules") that are distributed under the VRT
# Certified Rules License Agreement (v 2.0), and (ii) rules that were created by
# Sourcefire and other third parties (the "GPL Rules") that are distributed under the
# GNU General Public License (GPL), v2.
#
# The VRT Certified Rules are owned by Sourcefire, Inc. The GPL Rules were created
# by Sourcefire and other third parties. The GPL Rules created by Sourcefire are
#--------------------------------------------------
# VRT Rule Packages Snort.conf
#
# For more information visit us at:
# http://www.snort.org Snort Website
# http://vrt-blog.snort.org/ Sourcefire VRT Blog
#
# Mailing list Contact: snort-sigs@lists.sourceforge.net
# False Positive reports: fp@sourcefire.com
# Snort bugs: bugs@snort.org