Skip to content

Instantly share code, notes, and snippets.

View NikhilNanjappa's full-sized avatar

Nikhil Nanjappa NikhilNanjappa

View GitHub Profile
@NikhilNanjappa
NikhilNanjappa / app.js
Created February 12, 2022 14:26
GDS Demo complete app.js
const path = require('path')
const nunjucks = require('nunjucks')
const express = require('express')
const app = express()
const port = 3004
nunjucks.configure([
path.join(__dirname, 'node_modules/govuk-frontend/'),
path.join(__dirname, 'app/views/')
], {
@NikhilNanjappa
NikhilNanjappa / scan-file.js
Last active February 12, 2022 14:38
Clam AV scan-file.js
'use strict';
const NodeClam = require('clamscan');
module.exports = async function scanFile(filePath) {
console.log(`Attempting virus scan for ${filePath}`);
const clamscan = await new NodeClam().init({
remove_infected: true,
debug_mode: false,
{
"data": [
"Afghanistan",
"Akrotiri",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",