I have this question because i was a PHP developer before and all of my project is run in apache server.
I’m newbee or Kotlin languague. I want learn Kotlin via create a project. Now I want create a project use Kotlin web server (may be use ktor framework). I want use this with react kotlin like https://github.com/JetBrains/create-react-kotlin-app to build my front end. How can i oganize my project to build that ?
I was trying to figure this out as well. The command itself structures your project to do this. See the readme documentation on the github page:
https://github.com/JetBrains/create-react-kotlin-app
You should have to run npx create-react-kotlin-app my-app but you will also some additional setup according to the docs.
If you are looking for a fullstack example, there is one here that uses react:
https://github.com/Kotlin/kotlin-fullstack-sample
I also found this Spring example here:
https://spring.io/guides/tutorials/react-and-spring-data-rest/
The Spring example actually uses Java, but you can just initialize your project with Kotlin instead.
Related
I was wondering if an angularjs project structure be created using the npm or any other commands.
Like for creating a new angular project we use:
ng new application_name
For creating a new react app we use:
npx create-react-app application_name
Can we even use npm for creating angularjs project?
I was looking for directory structures for AngularJs and thought it would be nice if there was a simple command for creating a new AngularJs project with the general structure.
Angular.js does not have a CLI as some other modern stack, so no one made that functionality and probably no one will never as it is deprecated.
I can think of a better solution like creating a git repository with an Angular.js boilerplate you want to use programatically and clone it instead. If you want to use git you will need to reinitialize the repository but that's not big deal.
You can take a look at this existing example repository which would be initialized using this:
git clone https://github.com/jbutko/AngularJS-Boilerplate.git
You could make your own project boilerplate and use instead of this one.
EDIT: Github allows to create your own template repository. You can check the docs here
I come from a background in Angular, but I wanted to start learning React. I want to make a React front-end for a nodejs Express web service.
In Angular, I could simply build the source code into a static folder with a standard index.html, and it can be deployed on any web server. With React however, every tutorial I see is about running React in its own server using create-react-app and npm start.
I know you can also just use script tags to import the React framework in a static page, but then you can't use JSX syntax, and I would like to. Is it possible to simply build a React project into a static folder with an index.html that can be deployed on any web server?
Yep, you can do what you're describing. If you want to use JSX syntax, you'll need Babel, which transpiles it into standard JavaScript.
You can avoid the complexities of setting it up by using create-react-app to create the app, then running npm build instead of npm start. This will compile everything into a build directory, complete with index.html.
CRA uses its server for development purposes. You don't need CRA for using React of course. But, as your app getting bigger and bigger you will need some more extra tools. For example you want to see your code instantly without refreshing your browser. Here comes the dev server and hot reloading.
CRA uses Webpack behind the scenes. It is a great tool for bundling (obviously) all your files (including css), minifying, uglifying, optimizing your code etc.
For simple code or testing purposes using one file and attaching React and Babel to your file could be enough but for real apps you will need more. Either you will use something like Webpack on your own or you will use CRA and let it do all the extra stuff for you.
I'd like to integrate/use an aspnet core 2 mvc app with react built using the react CLI "create-react-app".
I'd prefer to avoid all the boilerplate provide by SPA template.
Could you please me help to figure out all the steps required to integrate for. ex. gulp to code against the app created with the CLI in VS editor and see the result when I launch the website from VS and see the change while the website is running?
I am new for React -Redux.
For creating a project Is there any command available so that It's create default folder and file?
For Example:-
In Angular we can create project through Angular-Cli.
So, In React -Redux is there available something like that?
If you use create-react-app command this create form a structure like so:
Source
As React is a only a view library the official create-react-app cli doesn't provide redux with it.
But there are alternatives like:
https://www.reactboilerplate.com
Also: you could get a boilerplate project integrated with backend of your choice. Like:
https://github.com/geowarin/boot-react for Java Spring
dotnet new react-redux for .Net Core
Redux does not enforce any folder or file structure.
But there are some patterns and designs you can follow in React app.
Check the docs.
I'm looking into creating an app with typescript and angular 1.6.0. But everywhere I look is using webpack, babel, grunt, gulp, there is no single consensus on which is the best way to proceed with an app like this.
Anyone got any hints?
Thank you.
Do you have a specific need for using angular 1.6.0? As opposed to creating an angular2 project?
You can get more information here: Angular-cli
Angular cli currently includes webpack and you will not need to use gulp or grunt at all. In addition to the angular cli bundling your app together it allows easy build for Ahead of Time Compilation and tree shaking. Having these two features is nice for when you are ready to deploy your application to a production server you can bundle the application into a small package and serve a small amount of JS files.
Using the angular cli also helps you to code with best practices within an angular2 application. You generate new components/directives/pipes with a simple ng generate [component] [name] command.
I would strongly suggest reading through the angular quickstart for ts guide located here: Angular-Quickstart
Also, if you do not want to generate your own projects using the angular-cli. There are various templates online that you can start your application with.
Good luck!
If you are planning to start from scratch, then why not Angular2 ?
My suggestion is Typescript2 + Angular2 with webpack. As stated by #Andy Angular-cli is good to go.