This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM devkhadka/ubuntuwithssh:1.0 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this command is necessary to tell Systemd to load our new config file | |
elspeth@server:$ sudo systemctl daemon-reload | |
# this command tells Systemd to always load our service on boot | |
elspeth@server:$ sudo systemctl enable gunicorn-superlists-staging.ottg.eu | |
# this command actually starts our service | |
elspeth@server:$ sudo systemctl start gunicorn-superlists-staging.ottg.eu | |
# Check the Systemd logs for using |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { render } from '@testing-library/react'; | |
import App from '../App'; | |
import Restaurants from '../Restaurants' | |
import {fetchRestaurants} from '../utils' | |
import * as fixtures from '../fixtures' | |
import { act } from 'react-dom/test-utils'; | |
// First mock whole '../Restaurants' and '../utils' | |
// By default it will mock all the functions in module to return undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from 'react'; | |
import './App.css'; | |
import { fetchRestaurants } from './utils'; | |
import Restaurants from './Restaurants'; | |
function App() { | |
const [restaurants, setRestaurants] = useState(null) | |
useEffect(()=>{ | |
fetchRestaurants() | |
.then(setRestaurants) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import {render, fireEvent} from '@testing-library/react' | |
import Restaurants from '../Restaurants' | |
import * as fixtures from '../fixtures' | |
import {calculateDistance} from '../utils' | |
jest.mock('../utils') | |
describe("Restaurants Component", ()=>{ | |
it("should render restaurants passed to it", ()=>{ | |
// render function returns a handle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"name": "MacDonald", | |
"location": [27.696927, 85.329353] | |
}, | |
{ | |
"id": 2, | |
"name": "Bajeko Sekuwa", | |
"location": [26.212754, 84.961525] |
OlderNewer