From f4749ee37d4671a404d95d6ff78265189e241e5e Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Wed, 5 Feb 2025 16:14:06 +0100 Subject: [PATCH] project structure --- .gitignore | 5 +++++ Dockerfile | 7 +++++++ LICENSE | 9 +++++++++ package.json | 14 ++++++++++++++ src/app.js | 8 ++++++++ 5 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 package.json create mode 100644 src/app.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a91a799 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Swap Files # +.*.kate-swp +.swp.* +node_modules/ +package-lock.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b1102e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:latest +WORKDIR /app +COPY package.json ./ +RUN npm install +COPY src/ ./ +EXPOSE 3333 +CMD ["node", "app.js"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a42f683 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + 4. Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by "Sam Hadow" (http://hadow.fr/).' + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/package.json b/package.json new file mode 100644 index 0000000..88942e3 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "e2ee-messaging-service", + "version": "0.0.1", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Sam Hadow", + "license": "BSD-3-Clause-Attribution", + "dependencies": { + "express": "^4.21.2" + } +} diff --git a/src/app.js b/src/app.js new file mode 100644 index 0000000..25496b9 --- /dev/null +++ b/src/app.js @@ -0,0 +1,8 @@ +const express = require('express') +const app = express() +app.get('/', function(request,result){ + result.send('Hello World!') +}) +app.listen(3333,"127.0.0.1",function(){ + console.log('hello world') +})