Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 950a8a8

Browse files
committed
fix ignored files and move lib/* -> utils/
1 parent 9576038 commit 950a8a8

File tree

10 files changed

+38
-9
lines changed

10 files changed

+38
-9
lines changed

.babelrc.bak renamed to .babelrc

File renamed without changes.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,5 @@ $RECYCLE.BIN/
115115
*.lnk
116116

117117
# Others
118-
lib/
119118
data/
120119
.next/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"feathers-authentication-client": "^0.3.3",
5656
"feathers-hooks": "^2.0.2",
5757
"feathers-rest": "^1.8.0",
58-
"isomorphic-fetch": "^2.2.1",
58+
"isomorphic-unfetch": "^2.0.0",
5959
"js-cookie": "^2.1.4",
6060
"next": "2.4.7",
6161
"nprogress": "^0.2.0",

pages/jobs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import FaLocation from 'react-icons/lib/fa/map-marker';
66
// Import FaArrowRight from 'react-icons/lib/fa/angle-right'
77

88
import publicPage from '../../hocs/public-page';
9-
import { client as feathersClient } from '../../lib/feathers-client';
9+
import { client as feathersClient } from '../../utils/feathers-client';
1010
import truncateString from '../../utils';
1111

1212
const _jobTypes = ['FullTime', 'PartTime', 'Remote', 'Consulting', 'Freelance'];

pages/jobs/new.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from 'semantic-ui-react';
1313

1414
import secretPage from '../../hocs/secret-page';
15-
import { client as feathersClient } from '../../lib/feathers-client';
15+
import { client as feathersClient } from '../../utils/feathers-client';
1616

1717
const _jobTypes = ['FullTime', 'PartTime', 'Remote', 'Consulting', 'Freelance'];
1818

pages/profile/new.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Grid,
1212
} from 'semantic-ui-react';
1313

14-
import feathersClient from '../../lib/feathers';
14+
import { client as feathersClient } from '../../utils/feathers-client';
1515
import secretPage from '../../hocs/secret-page';
1616

1717
const technologies = [

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const express = require('express');
22
const next = require('next');
33
const cookieParser = require('cookie-parser');
4-
const fetch = require('isomorphic-fetch');
4+
const fetch = require('isomorphic-unfetch');
55
const feathers = require('feathers/client');
66
const hooks = require('feathers-hooks');
77
const auth = require('feathers-authentication-client');

utils/authenticate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Cookie from 'js-cookie';
22

3-
import { client as feathersClient, baseUrl } from '../lib/feathers-client';
3+
import { client as feathersClient, baseUrl } from './feathers-client';
44

55
export function login(service, url) {
66
let href;

utils/feathers-client.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fetch from 'isomorphic-unfetch';
2+
import feathers from 'feathers/client';
3+
import hooks from 'feathers-hooks';
4+
import auth from 'feathers-authentication-client';
5+
import rest from 'feathers-rest/client';
6+
7+
const baseUrl =
8+
process.env.NODE_ENV === 'production'
9+
? `https://api.coderplex.org`
10+
: 'http://localhost:4000';
11+
12+
const client = feathers();
13+
14+
client
15+
.configure(rest(baseUrl).fetch(fetch))
16+
.configure(hooks())
17+
.configure(auth());
18+
19+
export { client, baseUrl };

yarn.lock

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,13 +3015,20 @@ isobject@^2.0.0:
30153015
dependencies:
30163016
isarray "1.0.0"
30173017

3018-
isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1:
3018+
isomorphic-fetch@^2.1.1:
30193019
version "2.2.1"
30203020
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
30213021
dependencies:
30223022
node-fetch "^1.0.1"
30233023
whatwg-fetch ">=0.10.0"
30243024

3025+
isomorphic-unfetch@^2.0.0:
3026+
version "2.0.0"
3027+
resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-2.0.0.tgz#f50140a4c163d7582b5f37f1591968c4f809a645"
3028+
dependencies:
3029+
node-fetch "^1.7.1"
3030+
unfetch "^3.0.0"
3031+
30253032
isstream@~0.1.2:
30263033
version "0.1.2"
30273034
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@@ -3683,7 +3690,7 @@ [email protected]:
36833690
write-file-webpack-plugin "4.0.2"
36843691
xss-filters "1.2.7"
36853692

3686-
node-fetch@^1.0.1:
3693+
node-fetch@^1.0.1, node-fetch@^1.7.1:
36873694
version "1.7.1"
36883695
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5"
36893696
dependencies:
@@ -5217,6 +5224,10 @@ [email protected]:
52175224
version "2.1.2"
52185225
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-2.1.2.tgz#684fee4d8acdb135bdb26c0364c642fc326ca95b"
52195226

5227+
unfetch@^3.0.0:
5228+
version "3.0.0"
5229+
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-3.0.0.tgz#8d1e0513a4ecd0e5ff2d41a6ba77771aae8b6482"
5230+
52205231
unique-string@^1.0.0:
52215232
version "1.0.0"
52225233
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"

0 commit comments

Comments
 (0)