mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
npx eslint --fix
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
This code is part of Blink
|
||||
licensed under GPLv3
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
@ -20,10 +20,9 @@ const rateLimit = require('express-rate-limit');
|
||||
const personRoutes = require('./routes/person_routes.js');
|
||||
const organizationRoutes = require('./routes/organization_routes.js');
|
||||
const organizationAdminRoutes = require('./routes/organization_admin_routes.js');
|
||||
const organizationPostRoutes = require('./routes/organization_post_routes.js')
|
||||
const organizationPostRoutes = require('./routes/organization_post_routes.js');
|
||||
const jwt_utils = require('./utils/jwt_utils.js');
|
||||
|
||||
|
||||
// Application configuration
|
||||
const app = express();
|
||||
app.use(express.json()); // Middleware which parses JSON for POST requests
|
||||
@ -31,7 +30,7 @@ app.use(cors()); // Enable CORS for all routes
|
||||
app.use(rateLimit({
|
||||
windowMs: process.env.LIMITER_WINDOW,
|
||||
max: process.env.LIMITER_MAXIMUM_PER_WINDOW,
|
||||
message: {error : "Too many requests from this IP, please try again later"}
|
||||
message: { error: 'Too many requests from this IP, please try again later' }
|
||||
})); // Apply the rate limiter middleware to all routes
|
||||
|
||||
const publicRoutes = express.Router();
|
||||
@ -63,4 +62,4 @@ app.listen(port, () => {
|
||||
console.log(`Blink API server is running on port ${port}`);
|
||||
});
|
||||
|
||||
module.exports = app;
|
||||
module.exports = app;
|
||||
|
Reference in New Issue
Block a user