We need to generate secret key for development environment.
mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hfLet's generate User model and controller.
| package hello; | |
| import hello.dto.PostDto; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.batch.core.Job; | |
| import org.springframework.batch.core.Step; | |
| import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | |
| import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; | |
| import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; |
| lucky-blog git:(master) bin/setup | |
| ▸ Installing node dependencies | |
| warning laravel-mix > autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. | |
| warning laravel-mix > css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. | |
| warning laravel-mix > css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. | |
| warning laravel-mix > css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. | |
| warning "laravel-mix > img-loader@3.0.1" has unmet peer dependency "imagemin@^5.0.0 || ^6.0.0". |
| let regex; | |
| /* matching a specific string */ | |
| regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
| regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
| regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
| /* wildcards */ | |
| regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
| regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
| // 20181203173529 | |
| // http://localhost:3000/apidocs | |
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "version": "1.0.0", | |
| "title": "Example Project API", | |
| "description": "A Swagger Project API that uses a bla-bla-bla project features in commliance with the swagger-2.0 specification", | |
| "contact": { |
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| }); |
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| // this component only received args from the caller | |
| // but it does track its own local info property | |
| info: '', // initial form field value | |
| }); |
I tried to test a single action:
public class ListsController extends APIController {
public void index(){
view("lists", List.findAll().orderBy("id"));
render().contentType("application/json");
}
}
The latest Paperclip release 5.1.0 has changed a little bit the way to set it up with Amazon S3 service (Amazon Simple Storage Service). Moreover, after googling a lot here and there, we could see many solutions and settings, some of them being outdated, some - often different and did not work well. So I decided to summarize in one replace all the steps needed to set up your Rails application deployed on Heroku and be able to use it with Paperclip 5 and Amazon S3 service.
In case you don't know, Heroku does not allow your Rails application to write and offers read only access. What means that you can't use Paperclip and save your files to Heroku's file system.
So you will have to find a way to upload/store/read your files. As stated in Paperclip documentation, Paperclip ships with 3 storage adapters: