-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnodejs.js
More file actions
73 lines (64 loc) · 1.61 KB
/
nodejs.js
File metadata and controls
73 lines (64 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Task 3
// Create a nodejs server for job offers
// see the strings-arrays-objects-functions-promises.js file for the job offers data
const jobOffers = [
{
id: 1,
title: "Frontend Developer",
location: "Texas, USA",
salary: "100000",
skills: ["TypeScript", "React", "CSS"],
},
{
id: 2,
title: "Full Stack Engineer",
location: "London, UK",
salary: "80000",
skills: ["JavaScript", "Node.js", "Express"],
},
{
id: 3,
title: "React Engineer",
location: "Sidney, Australia",
salary: "90000",
skills: ["JavaScript", "React", "Redux"],
},
{
id: 4,
title: "Next.js Developer",
location: "Berlin, Germany",
salary: "110000",
skills: ["JavaScript", "Next.js", "TypeScript"],
},
{
id: 5,
title: "Full Stack Engineer (TypeScript, AWS)",
location: "Paris, France",
salary: "120000",
skills: ["TypeScript", "AWS", "Node.js"],
},
];
const createApi = (data1) => [
new Promise((resolve) => {
setTimeout(() => {
resolve(data1);
}, 30);
}),
new Promise((resolve) => {
setTimeout(() => {
resolve({
userId: 123,
name: "John Doe",
email: "example@example.com"
});
}, 50);
})
];
// /job-offers endpoint to return the job offers
// const express = require('express');
import express from 'express';
// How do you prevent access to job offer creation?
// How do you create a SQL base table for job offers?
// How do you request the job offers from SQL database?
// How do you create a mongoDB base table for job offers?
// How do you request the job offers from mongoDB database?