Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

submiting tech task #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
node_modules
front/dist
.DS_Store
stats.json
19 changes: 19 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# TESTIO.

This project was created according to the specifications of Tesonet [frontend-party](https://github.com/tesonet/frontend-party).

## Development server

Run `npm install` and `npm start` to start a dev server. Navigate to `http://localhost:9000/`.

Alternatively, you can use docker. Run `docker-compose up` and then navigate to `http://localhost:9000/`;

## Production Build

Run `npm run build` to build the project. Build artifacts will be stored in the `dist/` directory.

## Testing

Run `npm run test` to run unit tests. For TDD mode run `npm run tdd`, which will rerun tests on file changes.


57 changes: 0 additions & 57 deletions README.md

This file was deleted.

6 changes: 6 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.7'

services:
nodejs:
build:
context: .
dockerfile: docker/nodejs/Dockerfile
args:
image: node:10.16-alpine
project_path: /var/www/testio
restart: always
ports:
- "9000:9000"
command: node_modules/webpack/bin/webpack.js serve --host 0.0.0.0 --inline --public localhost:9000


20 changes: 20 additions & 0 deletions docker/nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG image
FROM ${image}

# Create working directory for project
ARG project_path
WORKDIR ${project_path}

# Copy package.json and pacakge-lock.json to container
COPY ./package*.json ./

# Install all packages with npm
RUN npm install

# Add node_modules/.bin to $PATH
ENV PATH ./node_modules/.bin:$PATH

# Copy project files
COPY ./ ./

EXPOSE 9000
14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const {defaults} = require('jest-config');

module.exports = {
...defaults,
verbose: true,
transform: {
"^.+\\.svg$": "jest-svg-transformer",
"^.+\\.js$": "babel-jest"
},
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif)$": "<rootDir>/tests/__mocks__/fileMock.js"
},
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.js']
};
Loading