fix(i18n): load locales from file system, instead of http-backend
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 314 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 319 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 329 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 323 KiB |
|
Before Width: | Height: | Size: 267 KiB |
|
Before Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 382 KiB |
|
Before Width: | Height: | Size: 205 KiB |
0
apps/server/src/assets/resumes/.gitkeep
Normal file
0
apps/server/src/assets/templates/.gitkeep
Normal file
0
apps/server/src/assets/uploads/.gitkeep
Normal file
@ -19,9 +19,6 @@ import { User } from '@/users/entities/user.entity';
|
||||
database: configService.get<string>('postgres.database'),
|
||||
synchronize: true,
|
||||
entities: [User, Resume],
|
||||
ssl: {
|
||||
ca: configService.get<string>('postgres.certificate'),
|
||||
},
|
||||
}),
|
||||
}),
|
||||
],
|
||||
|
||||
@ -27,10 +27,12 @@ const bootstrap = async () => {
|
||||
app.setViewEngine('hbs');
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const serverUrl = configService.get<number>('app.serverUrl');
|
||||
const port = configService.get<number>('app.port');
|
||||
|
||||
await app.listen(port);
|
||||
Logger.log(`🚀 Server is running on: http://localhost:${port}/${globalPrefix}`);
|
||||
|
||||
Logger.log(`🚀 Server is running on: ${serverUrl}/${globalPrefix}`);
|
||||
};
|
||||
|
||||
bootstrap();
|
||||
|
||||
@ -6,7 +6,7 @@ const sampleData: Partial<Resume> = {
|
||||
email: 'alexis.jones@gmail.com',
|
||||
phone: '+1 800 1200 3820',
|
||||
photo: {
|
||||
url: `${process.env.APP_URL}/images/sample-photo.jpg`,
|
||||
url: `/images/sample-photo.jpg`,
|
||||
filters: {
|
||||
size: 128,
|
||||
shape: 'rounded-square',
|
||||
|
||||
@ -31,10 +31,9 @@ export class ResumeService {
|
||||
async create(createResumeDto: CreateResumeDto, userId: number) {
|
||||
try {
|
||||
const user = await this.usersService.findById(userId);
|
||||
const serverUrl = this.configService.get<string>('app.serverUrl');
|
||||
|
||||
const shortId = nanoid(SHORT_ID_LENGTH);
|
||||
const image = `${serverUrl}/covers/${sample(covers)}`;
|
||||
const image = `/images/covers/${sample(covers)}`;
|
||||
|
||||
const resume = this.resumeRepository.create({
|
||||
...defaultState,
|
||||
@ -67,10 +66,9 @@ export class ResumeService {
|
||||
async import(importResumeDto: Partial<ResumeSchema>, userId: number) {
|
||||
try {
|
||||
const user = await this.usersService.findById(userId);
|
||||
const serverUrl = this.configService.get<string>('app.serverUrl');
|
||||
|
||||
const shortId = nanoid(SHORT_ID_LENGTH);
|
||||
const image = `${serverUrl}/covers/${sample(covers)}`;
|
||||
const image = `/images/covers/${sample(covers)}`;
|
||||
|
||||
const resume = this.resumeRepository.create({
|
||||
...defaultState,
|
||||
@ -168,10 +166,9 @@ export class ResumeService {
|
||||
async duplicate(id: number, userId: number) {
|
||||
try {
|
||||
const originalResume = await this.findOne(id, userId);
|
||||
const serverUrl = this.configService.get<string>('app.serverUrl');
|
||||
|
||||
const shortId = nanoid(SHORT_ID_LENGTH);
|
||||
const image = `${serverUrl}/covers/${sample(covers)}`;
|
||||
const image = `/images/covers/${sample(covers)}`;
|
||||
|
||||
const duplicatedResume: Partial<Resume> = {
|
||||
...pick(originalResume, ['name', 'slug', 'basics', 'metadata', 'sections', 'public']),
|
||||
|
||||