Skip to content

Commit

Permalink
Merge branch 'devel' into improve-queue-stubs-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ authored Sep 26, 2024
2 parents e52ad8d + aac4b94 commit 548ed71
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 57 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Use the same code whether you’re developing for web, iOS, Android, or desktop

How about trying a tutorial to get started with your favorite technology?

| [<img align="left" width="25" src="https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg"> React](https://react-tutorial.meteor.com/) |
| [<img align="left" width="25" src="https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg"> React](https://docs.meteor.com/tutorials/react/) |
| - |
| [<img align="left" width="25" src="https://progsoft.net/images/blaze-css-icon-3e80acb3996047afd09f1150f53fcd78e98c1e1b.png"> Blaze](https://blaze-tutorial.meteor.com/) |
| [<img align="left" width="25" src="https://vuejs.org/images/logo.png"> Vue](https://vue-tutorial.meteor.com/) |
Expand Down
18 changes: 0 additions & 18 deletions docs/scripts/kapa.js

This file was deleted.

35 changes: 35 additions & 0 deletions docs/scripts/legacy-warning.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* global hexo */

hexo.extend.filter.register('after_render:html', function (str) {
const warningMessage = `
<div class="warning-banner">
<p>
⚠️ You're browsing the documentation for an old version of Meteor.js.
Check out the <a href="https://docs.meteor.com" target="_blank">v3 docs</a> and <a href="https://v3-migration-docs.meteor.com/" target="_blank">migration guide</a>.
</p>
</div>
`;

const css = `
<style>
.warning-banner {
text-align: center;
background-color: #fff3cd;
border: 1px solid #ffeeba;
color: #856404;
margin-bottom: 20px;
}
.warning-banner a {
color: #0056b3;
text-decoration: underline;
}
.warning-banner a:hover {
color: #003d82;
}
</style>
`;

const injectedContent = css + warningMessage;

return str.replace(/<div class="content">/, `<div class="content" data-injected>${injectedContent}`);
});
2 changes: 1 addition & 1 deletion guide/source/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ This example from the Todos app defines a schema with a few simple rules:
3. We specify the `incompleteCount` is a number, which on insertion is set to `0` if not otherwise specified.
4. We specify that the `userId`, which is optional, must be a string that looks like the ID of a user document.

We're using the SimpleSchema for Meteor related funcitonality, like IDs, but we encourage you to create custom regEx expressions for security reasons, for fields like `email` or `name`. Check out the [Simple Schema docs](https://github.com/longshotlabs/simpl-schema#regex) for more information.
We're using the SimpleSchema for Meteor related functionality, like IDs, but we encourage you to create custom regEx expressions for security reasons, for fields like `email` or `name`. Check out the [Simple Schema docs](https://github.com/longshotlabs/simpl-schema#regex) for more information.

We attach the schema to the namespace of `Lists` directly, which allows us to check objects against this schema directly whenever we want, such as in a form or [Method](methods.html). In the [next section](#schemas-on-write) we'll see how to use this schema automatically when writing to the collection.

Expand Down
9 changes: 6 additions & 3 deletions v3-docs/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ export default defineConfig({
text: "Install Meteor",
link: "/about/install",
},
// TODO: Your first app meteor app
{
text: "Web Apps",
link: "/about/web-apps",
},
{
text: "Cordova",
link: "/about/cordova",
Expand Down Expand Up @@ -401,11 +404,11 @@ export default defineConfig({
// TODO: Open issue in Vitepress about this
{ link: "/history", text: "Meteor.js v3 (Current)" },
{
link: "https://docs.meteor.com/changelog",
link: "https://v2-docs.meteor.com/changelog",
text: "Meteor.js v2",
},
{
link: "https://docs.meteor.com/changelog#v112220211012",
link: "https://v2-docs.meteor.com/changelog#v112220211012",
text: "Meteor.js v1",
},
],
Expand Down
54 changes: 54 additions & 0 deletions v3-docs/docs/about/web-apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Web Apps

Meteor allows developers to build web applications using front-end frameworks like React, Vue, Blaze, Svelte, and Solid.
This section will help you quickly set up a new MeteorJS project using React.

## Step 1: Install Meteor

Ensure you have the latest official Meteor release installed. You can find installation instructions in our [docs](/about/install.html).

## Step 2: Create a New Project

To create a new project with Meteor and React, use the command:

```shell
meteor create myapp
```

This command sets up a Meteor project with React, allowing you to start developing right away.

You can also add the `--react` option to explicitly choose React, but it's already included by default.
If you prefer TypeScript, simply add the `--typescript` option.

```shell
meteor create myapp --typescript
```

### Additional Options

Meteor offers flags to generate different types of apps, like choosing a different front-end framework or configurations during project setup.

Additional options are available in the [Meteor CLI](/cli/#meteor-create-app-name) section.

## Step 3: Run Your Project Locally

Navigate into your project directory and start the Meteor server:

```shell
cd myapp
meteor
```

With no arguments, `meteor` runs the project in the current directory in local development mode.
Your application will be running at `http://localhost:3000/`, ready for you to begin development.

## Getting Help

You can find help for using the Meteor command line. Just run `meteor help` to see a list of common commands.
If you want detailed help about a specific command, run `meteor help <command>`. For example, `meteor help create`.

## Next Steps

- Follow the [React](/tutorials/react/index.html) or [Vue](/tutorials/vue/meteorjs3-vue3-vue-meteor-tracker.html) tutorials. New tutorials are coming soon.
- Read about [Cordova for Mobile Apps](/about/cordova.html).
- Explore the [Meteor Guide](https://guide.meteor.com/).
18 changes: 12 additions & 6 deletions v3-docs/docs/about/what-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,29 @@

Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node.js and general JavaScript community.

- Meteor allows you to develop in **one language**, JavaScript, in all environments: application server, web browser, and mobile device.
- Meteor allows you to develop in **one language**, JavaScript or TypeScript, in all environments: application server, web browser, and mobile device.

- Meteor uses **data on the wire**, meaning the server sends data, not HTML, and the client renders it.

- Meteor **embraces the ecosystem**, bringing the best parts of the extremely active JavaScript community to you in a careful and considered way.

- Meteor provides **full stack reactivity**, allowing your UI to seamlessly reflect the true state of the world with minimal development effort.

- Meteor offers **flexibility in front-end** development, allowing you to choose your preferred framework such as React, Vue, Blaze, Svelte, or Solid.

- Meteor **simplifies back-end and front-end integration** through Methods, its built-in Remote Procedure Call (RPC) system for seamless communication.

- Meteor includes a **ready-to-use Login and Accounts** package, eliminating the need to rebuild authentication systems for your applications.

## Meteor Resources {#learning-more}

### Learning Meteor

- Start by learning how to install Meteor in the [Installation Section](/about/install.html).

- For beginners, the [Tutorials](https://www.meteor.com/developers/tutorials) are the perfect place to start with Meteor. Build a simple app to manage a task list! Available for [React](https://react-tutorial.meteor.com/), [Blaze](https://blaze-tutorial.meteor.com/), [Svelte](https://svelte-tutorial.meteor.com/), and [Vue 3](https://vue3-tutorial.meteor.com/).
- The tutorials are the perfect place to start. Build a simple app to manage a task list! Available for [React](/tutorials/react/index.html), and [Vue 3](/tutorials/vue/meteorjs3-vue3-vue-meteor-tracker.html). Blaze and Svelte tutorials are coming soon.

- Participate in Meteor's fully professional, engaging and interactive online school. Join [Meteor University](https://university.meteor.com/).
- Participate in Meteor's fully professional, engaging and interactive online school. Join [Meteor University](https://university.meteor.com/). Our courses cover Meteor 2 but most of the content is still relevant.

- Subscribe to our official [Youtube channel](https://www.youtube.com/@meteorsoftware) and watch the latest MeteorJS videos and presentations.

Expand All @@ -46,8 +52,8 @@ Meteor is a full-stack JavaScript platform for developing modern web and mobile

### Join Our Community

- Participate in the [Official Forum](https://forums.meteor.com) for project news, support, community discussions, and updates on core features.
- Participate in the [Official Forum](https://forums.meteor.com) for project news, support, and community discussions.

- Join the discussion and stay updated with announcements on the official [Meteor Lounge Discord](https://discord.gg/hZkTCaVjmT).
- Join the discussion and live streams on the official [Meteor Lounge Discord](https://discord.gg/hZkTCaVjmT).

- Engage with peers in the [Meteor Slack Community](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc) for technical support, meeting new developers, and exchanging ideas.
- Engage with peers in the [Meteor Slack Community](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc).
7 changes: 6 additions & 1 deletion v3-docs/docs/api/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,11 +1175,16 @@ option:
You can pass any MongoDB valid option, these are just examples using
certificates configurations.

If you're using a certificate and having authentication errors when trying to connect to a database other than `admin`, make sure to provide the flags `&ssl=true&authSource=admin`. You MONGO_URL string should look like this:

```
mongodb://<username>:<password>@[server-1],[server-2],[server-3]/my-database?replicaSet=my-replica&ssl=true&authSource=admin
```

### Mongo Oplog Options {#mongo-oplog-options}

> Oplog options were introduced in Meteor 2.15.1
If you set the [`MONGO_OPLOG_URL`](https://docs.meteor.com/environment-variables.html#MONGO-OPLOG-URL) env var, Meteor will use MongoDB's Oplog to show efficient, real time updates to your users via your subscriptions.
If you set the [`MONGO_OPLOG_URL`](/cli/environment-variables.html#mongo-oplog-url) env var, Meteor will use MongoDB's Oplog to show efficient, real time updates to your users via your subscriptions.

Due to how Meteor's Oplog implementation is built behind the scenes, if you have certain collections where you expect **big amounts of write operations**, this might lead to **big CPU spikes on your meteor app server, even if you have no publications/subscriptions on any data/documents of these collections**. For more information on this, please have a look into [this blog post from 2016](https://blog.meteor.com/tuning-meteor-mongo-livedata-for-scalability-13fe9deb8908), [this github discussion from 2022](https://github.com/meteor/meteor/discussions/11842) or [this meteor forums post from 2023](https://forums.meteor.com/t/cpu-spikes-due-to-oplog-updates-without-subscriptions/60028).

Expand Down
Loading

0 comments on commit 548ed71

Please sign in to comment.