Initial express.js project structure

This commit is contained in:
Gregory Ballantine 2022-05-24 18:09:21 -04:00
parent 603e01f2cf
commit 59f3a45347
7 changed files with 1054 additions and 9 deletions

10
.gitignore vendored
View File

@ -1,8 +1,2 @@
# ---> Composer # Modules installed via NPM
composer.phar node_modules/
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

View File

@ -1,4 +1,4 @@
Copyright (c) <year> <owner> Copyright (c) 2022 Metaunix
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

11
index.js Normal file
View File

@ -0,0 +1,11 @@
const express = require('express');
const app = express();
const port = 3000;
indexRoutes = require('./routes/index');
app.get('/', indexRoutes.home);
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
});

1018
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

19
package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "archon",
"version": "0.1.0",
"description": "A web-based LDAP user and group manager",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "gitea@git.metaunix.net:metaunix/archon.git"
},
"author": "Gregory Ballantine <gballantine@metaunix.net>",
"license": "BSD-2-Clause",
"dependencies": {
"express": "^4.18.1"
}
}

0
public/.gitkeep Normal file
View File

3
routes/index.js Normal file
View File

@ -0,0 +1,3 @@
exports.home = function(req, res, next) {
res.send('Hello World!');
};