Prepare backend for production api path
This commit is contained in:
@@ -22,6 +22,8 @@ app.use(morgan(env.nodeEnv === 'production' ? 'combined' : 'dev'));
|
||||
app.use(express.json());
|
||||
|
||||
app.use('/auth/login', authRateLimiter);
|
||||
app.use('/api/auth/login', authRateLimiter);
|
||||
app.use('/api', routes);
|
||||
app.use(routes);
|
||||
app.use(notFound);
|
||||
app.use(errorHandler);
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
const fs = require('fs/promises');
|
||||
const path = require('path');
|
||||
const env = require('../config/env');
|
||||
|
||||
const getUserCertificatePath = async (userId) => {
|
||||
const fullPath = path.resolve(
|
||||
'/home/mgonzalez/desarrollo/react/linkedsign/backend/storage/certificates/users',
|
||||
env.storagePath,
|
||||
'certificates',
|
||||
'users',
|
||||
String(userId)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user