Initial express.js project structure
This commit is contained in:
parent
603e01f2cf
commit
59f3a45347
10
.gitignore
vendored
10
.gitignore
vendored
@ -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
|
|
||||||
|
|
||||||
|
2
LICENSE
2
LICENSE
@ -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
11
index.js
Normal 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
1018
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
package.json
Normal file
19
package.json
Normal 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
0
public/.gitkeep
Normal file
3
routes/index.js
Normal file
3
routes/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
exports.home = function(req, res, next) {
|
||||||
|
res.send('Hello World!');
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user