how can I create multi language site with Nuxt? [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
hi my friends I have a question
how can I create multi language site with Nuxt?
my site is ssr and I don't want use any package beacuse client wants to me handle this without package

Not sure why you don't want to use the i18n package but as told before: You can create your own solution with some vanilla code I guess.
IMO, you will lose quite some time doing this. I'd prefer to use a package who does that well rather than trying to achieve it myself because I'd probably bump into un-expected edge cases.
You can always get inspiration from the i18n module source code itself but then, why not use it directly. Using a battle tested package in the JS world is not a bad idea. Especially if it's mantained well (by Pooia).
Reminds me of this one: https://imgs.xkcd.com/comics/standards.png

Related

How to publish a JavaScript function [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have made a JavaScript function that I think could be useful to many people.
How would I do to "publish" it?
How can I make it as easy as possible for other people to include it in their projects?
(I'm not concerned about payment, licensing & such right now. If any, it should be free & permissive, although donations would be appreciated but not required).
For javascript I'd recommend creating an npm package and register it at npmjs.com
1. If you want just to publish it, do it in https://www.npmjs.com/.
2. If you want to store your code in a repository, where other people will be able to contribute and help you building your product, the most popular source control system is https://github.com/. More, you can set up your account to receive donations by other people and companies as well.
3. Next step(not a part of the question) is to automate the whole process of building, testing, deployment from your source control system(https://github.com/ ) to the javascript packages storage(https://www.npmjs.com/) using CI/CD(continuous integration/continuous delivery) tools(e.g. https://jenkins.io/).
There are many ways in which you can do that. For the simpler stuff, you can use Pastebin (https://pastebin.com/) or CodePen (https://codepen.io/) for instance. You can also create a project on GitHub (https://github.com/) or publish a package over at NPM (https://www.npmjs.com/, https://docs.npmjs.com/cli/publish), either of these two being a must for a bigger library.
Also make sure to properly document your code and make it ease to find.

JavaScript or React - database security in single-page website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Welcome stackoverflow community.
I'm doing small project, simple single-page website. It will also contain contact form which takes user to different page. I decided to create a database since on website I will do few responsive features ie. booking calendar where occupied dates won't be available. I wrote all my projects in vanilla js so far. I'm wondering that adding react to this project will be overkill.
I did research and know roughly cons and props for using it but I couldn't find answer if react gives you some extra safety features comparing to using vanilla js over attacks to website, and if yes, does it makes sense to write whole project in react just for those features?
Many thanks for any feedback.
I don't think you should be rewriting your app in react just for security. If you have any sensitive information. You should be keeping it on the server and not on the front-end.
For a small project. Vanilla JS can be enough. React is just for helping you manage and create UI components. It will not give you any extra security as it is still javascript in the end.

Search large data in the react native list-view [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have 9000 offline records in the list-view of react native app,I want to add search filter without affecting performance of the application .Please suggest me what approach I should adopt to search the large local data.
If your really need great performances, you should try Realm Database.
Maybe it's not a proper answer because you are not asking for a new DB mechanisms but I think it's the way to go.
However, a React native version is out (V1.0) and do a better job than AsyncStorage. Then you can make very complex queries like SQL and handle relations betweens datas.
More informations and benchmarks : https://realm.io/news/introducing-realm-react-native/

Is there any advantage to use the Mantra.js architecture framework? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Meteor.js integrates well inside a Mantra.js architecture, but does it have advantages since it slows the running of my requests.
For instance a dummy request in GraphQL (get a random string from the server) runs in few ms using Apollo Client and 1 second and more using Mantra.js (exact same request wrapping Apollo stack).
It only depends what kind of project you want to work on.
Mantra.js is an architecture framework for Meteor.js, that means :
it helps a developer to follow the creation and development of its modules corresponding to the Mantra framework. The developer is free to use any kind of front-end library he/she wants, any Data Query and Client caching he wants, but in my opinion, it doesn't really improve the quality of the code. Someone can organize a project with own rules and it can be maintainable easily.
So if your team is comfortable with your code structure you definitively don't need something like Mantra.js.

Example Sign-up/Sign in using node.js [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm new on using node.js
Surfing around the web i couldn't find any example of code of a simple sign-up/sign-in that could also show me how to manage database in node.
I mean the app.js page for server and the related client-side html page, and their relation. Can someone help me or give some useful link i couldn't find?
using Cassandra and i.o. socket, it'd be the best help.
You can use Passport library http://passportjs.org/ , there should be an example there. You can also use https://npmjs.org/package/passport.socketio if you want to login by socket.io
I recommend using http://passportjs.org
It has support for simple username/password authentication as well as OAuth etc
http://passportjs.org/guide/username-password/
There's also a good tutorial here:
http://danialk.github.io/blog/2013/02/23/authentication-using-passportjs/

Categories