• Stars
    star
    6
  • Rank 2,532,980 (Top 51 %)
  • Language
    Java
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The repository contains an example for upload file using Jhipster (Spring and Angular)

fileupload

This application was generated using JHipster 5.8.2, you can find documentation and help at https://www.jhipster.tech/documentation-archive/v5.8.2.

Development

Before you can build this project, you must install and configure the following dependencies on your machine:

  1. Node.js: We use Node to run a development web server and build the project. Depending on your system, you can install Node either from source or as a pre-packaged bundle.

After installing Node, you should be able to run the following command to install development tools. You will only need to run this command when dependencies change in package.json.

npm install

We use npm scripts and Webpack as our build system.

Run the following commands in two separate terminals to create a blissful development experience where your browser auto-refreshes when files change on your hard drive.

./mvnw
npm start

Npm is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by specifying a newer version in package.json. You can also run npm update and npm install to manage dependencies. Add the help flag on any command to see how you can use it. For example, npm help update.

The npm run command will list all of the scripts available to run for this project.

Service workers

Service workers are commented by default, to enable them please uncomment the following code.

  • The service worker registering script in index.html
<script>
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('./service-worker.js').then(function() {
            console.log('Service Worker Registered');
        });
    }
</script>

Note: workbox creates the respective service worker and dynamically generate the service-worker.js

Managing dependencies

For example, to add Leaflet library as a runtime dependency of your application, you would run following command:

npm install --save --save-exact leaflet

To benefit from TypeScript type definitions from DefinitelyTyped repository in development, you would run following command:

npm install --save-dev --save-exact @types/leaflet

Then you would import the JS and CSS files specified in library's installation instructions so that Webpack knows about them: Edit src/main/webapp/app/vendor.ts file:

import 'leaflet/dist/leaflet.js';

Edit src/main/webapp/content/css/vendor.css file:

@import '~leaflet/dist/leaflet.css';

Note: there are still few other things remaining to do for Leaflet that we won't detail here.

For further instructions on how to develop with JHipster, have a look at Using JHipster in development.

Using angular-cli

You can also use Angular CLI to generate some custom client code.

For example, the following command:

ng generate component my-component

will generate few files:

create src/main/webapp/app/my-component/my-component.component.html
create src/main/webapp/app/my-component/my-component.component.ts
update src/main/webapp/app/app.module.ts

Building for production

To optimize the fileupload application for production, run:

./mvnw -Pprod clean package

This will concatenate and minify the client CSS and JavaScript files. It will also modify index.html so it references these new files. To ensure everything worked, run:

java -jar target/*.war

Then navigate to http://localhost:8080 in your browser.

Refer to Using JHipster in production for more details.

Testing

To launch your application's tests, run:

./mvnw clean test

Client tests

Unit tests are run by Jest and written with Jasmine. They're located in src/test/javascript/ and can be run with:

npm test

For more information, refer to the Running tests page.

Code quality

Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:

docker-compose -f src/main/docker/sonar.yml up -d

Then, run a Sonar analysis:

./mvnw -Pprod clean test sonar:sonar

For more information, refer to the Code quality page.

Using Docker to simplify development (optional)

You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the src/main/docker folder to launch required third party services.

For example, to start a mysql database in a docker container, run:

docker-compose -f src/main/docker/mysql.yml up -d

To stop it and remove the container, run:

docker-compose -f src/main/docker/mysql.yml down

You can also fully dockerize your application and all the services that it depends on. To achieve this, first build a docker image of your app by running:

./mvnw package -Pprod verify jib:dockerBuild

Then run:

docker-compose -f src/main/docker/app.yml up -d

For more information refer to Using Docker and Docker-Compose, this page also contains information on the docker-compose sub-generator (jhipster docker-compose), which is able to generate docker configurations for one or several JHipster applications.

Continuous Integration (optional)

To configure CI for your project, run the ci-cd sub-generator (jhipster ci-cd), this will let you generate configuration files for a number of Continuous Integration systems. Consult the Setting up Continuous Integration page for more information.

More Repositories

1

xstate

✨ A lightweight state machine library for PHP (inspired by xstate.js)
PHP
85
star
2

laravel-model-trackable

🔍 Laravel package that allows you to track and log nested changes applied on your models
PHP
58
star
3

laravel-query-inspector

The missing laravel helper that allows you to inspect your eloquent queries with it's bind parameters
PHP
56
star
4

mouadziani.com

🤵 My personal website, built with Nuxt.js and TailwindCss
Vue
43
star
5

laravel-deployer

Fast way to deploy your laravel project with one single command
Shell
40
star
6

laravel-mercanet

💵 A Laravel package for integrating the BnpParibas Mercanet
PHP
31
star
7

Larabye

🎉 Larabye (Laravel + Rockabye) is a mini PHP starter / framework inspired from laravel features
PHP
31
star
8

ur-fullstack-coding-challenge

💪 My own implementation of the United Remote web coding challenge.
PHP
15
star
9

awesome-rockabye

🎵 Best covers of ROCKABYE ( CLEAN BANDIT FT. SEAN PAUL & ANNE-MARIE ), Nb: Only for Rockabye lovers
12
star
10

mouadziani

11
star
11

operator-mono-font

10
star
12

design-patterns-in-java

☕️ Implementation of the most popular design patterns using JAVA
Java
10
star
13

30-days-of-spring

🌱 30 days of Spring Framework Challenge
Java
9
star
14

millions-backend-challenge

My own implementation of the backend challenge
PHP
8
star
15

trolls-maker

[WIP] - Web application that allows you to make your own memes
Vue
6
star
16

access-tests-management

🚀 This project is for first tests management, for university that has tests before registration of students for the scholar year based on Java swing
Java
6
star
17

excel-diff-checker

Excel-diff-checker is a python script to compare lines to find the difference between two csv files.
Python
6
star
18

me

☕️ My resume
CSS
4
star
19

ngrx-practices

TypeScript
4
star
20

mouadziani.github.io

Personal website 🤵🏼
HTML
4
star
21

trance

🎵 Collection of my preferred trance tracks (for trance hipsters only)
4
star
22

Value-Object-Maker

[WIP] Generate a Value Object class with attributes from your existing eloquent models with one single command
4
star
23

votes-system

PHP
3
star
24

messneger-ui

Messenger UI clone using Vuejs & Tailwind Css
Vue
3
star
25

Flutter_EXAM

This repository contains my own implementation of the final exam of the mobile development 2 module (Master ISI)
Dart
3
star
26

laravel-model-progressible

[WIP] Easily make your model entries progressible
3
star
27

github-actions-laravel

Shared configs to deploy your laravel project via SSH using github actions
3
star
28

sales-analysis-hadoop

Sales analysis program using Hadoop
Java
3
star
29

travels-template

Landing page travel website buit on html, css, js, bootstrap4 from scratch :)
HTML
3
star
30

spring-boot-security-starter

Spring boot with spring security starter
Java
2
star
31

hierarchical-clustering

Hierarchical Clustering with Python and Scikit-Learn
Jupyter Notebook
2
star
32

Agents_Communication_JADE_MADKIT

Exchange messages between agents using Jade and Madkit platforms
Java
2
star
33

nova-acl

[WIP] Full roles and permissions system for laravel nova panel
2
star
34

ify

IdeaForYou App with angular and spring boot
Java
2
star
35

software-security-notes

My notes while studying Software Security
1
star
36

student_coloco_web

PHP
1
star
37

ACADEMIC-WEB-DEVELOPMENT-PROJECTS

My academic projects that I created while learning web development as Master ISI Student
PHP
1
star
38

zero-spark

[WIP] - Laravel spark clone based on TALL stack (built for artisanal web developers)
1
star
39

WH-FE-SLICING-TEST

My own implementation of the WalletHub Frontend slicing Tests challenge.
HTML
1
star
40

pizza-delivry

Web application for manage pizza deliveries based on JavaEE (JSF & JPA)
Java
1
star
41

SPRING-MVC-ACADEMIC-PROJECTS

Java
1
star
42

logistique

JavaScript
1
star
43

cosmy-web

Social Network and E-commerce platform for hairdressers staff
CSS
1
star
44

users-manager

Web application for manage users based on Jave EE, MVC Pattern & DataSource JNDI
Java
1
star
45

hb-hs

CSS
1
star
46

personnes-manager

Demo descktop application based on Java Swing & MVC Pattern
Java
1
star
47

mastering-laravel-step-by-step

This repository will contains lot of laravel modules as exercises (made for H.S = ANTAR)
1
star
48

Laravel_EXAM

This repository contains my own implementation of the final exam of the backend web development module (Master ISI)
PHP
1
star
49

watchcrunch

PHP
1
star
50

WH-FE-NG-TEST

My own implementation of the WalletHub Angular Tests challenge.
TypeScript
1
star